<xml></xml>

| Online Eiffel Documentation

EiffelStudio

# Referenced Assembly Type and Feature Name Conversion

The Eiffel for .NET language is Eiffel. It is not a variant of Eiffel that spawned a new language, as is C#, or a dramatic evolution of Eiffel, such as Visual Basic .NET is to VB6. As Eiffel stands today, and will probably remain, Eiffel's conventions for class names and features names do not match that of the Pascal and Camel-casing conventions recommended by Microsoft. Eiffel also does not support the notion of full quantified type names. The period ('.') between namespace and type names is not valid Eiffel syntax. These naming convention rules pose a problem for maintaining the Eiffel language. To address this issue, when referencing .NET assemblies, all referenced assembly type names and feature names are converted into "Eiffel-case" when using Eiffel.

## What is Eiffel-Case?

Eiffel-casing is almost the same for both class and class feature names, all words are separated using underscores ('_'). The differences between them are class names are always in uppercase and feature names always in lowercase.

MY_CLASS is an example of an Eiffel-cased class name.
my_feature is an example of an Eiffel-cased feature name.

There are complex rules to ensure that the automatic formatting of .NET name, type, method, property and otherwise are formatted to the most readable name possible, given their casing convention. One absolute is that the Eiffel compilation process will remove the namespace from the fully qualified type name and format just the type name.

For example System.Windows.Forms.Border3DStyle would yield BORDER_3D_STYLE.

Stripping the namespace from the name is essential to keep type names short and usable, who wants to use SYSTEM_WINDOWS_FORMS_BORDER_3D_STYLE? Dropping the namespace does present a potential problem; assemblies may have two type that are of the same name but are located in different namespaces. A resolution to this comes in the form of assembly prefixes. For every assembly a class name prefix can be specified. Eiffel Software have reserved a set of assembly prefix pairs which should not be change as they are used by the Eiffel class libraries. For example, System.Windows.Forms.dll contains a commonly used type called System.Windows.Forms.Form. During the compilation process System.Windows.Forms.dll will be evaluated and System.Windows.Forms.Form will yield the FORM Eiffel class name. System.Windows.Forms.dll has been assigned the 'WINFORMS_' prefix, so FORM would actually be WINFORMS_FORM instead.

## Reserved Prefixes

The following table displays the fixed assembly class name prefixes, assigned by Eiffel Software, for the Microsoft Foundation Class Libraries:

mscorlib.dll | No Prefix
System.dll | SYSTEM_DLL_
System.XML.dll | XML_
System.Data.dll | DATA_
System.Web.dll | WEB_
System.EnterpriseServices.dll | ENTERPRISE_
System.Windows.Forms.dll | WINFORMS_