Upcoming release 24.05

git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2469 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
eifops
2024-06-03 09:22:03 +00:00
parent 559c525f51
commit 5b930d3032
2960 changed files with 63764 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
[[Property:title|Eiffel CodeDom Provider Manager]]
[[Property:weight|-1]]
[[Property:uuid|089e658f-4bd8-df8f-5647-0c176c00359b]]
The Eiffel Codedom Provider Manager allows graphical configuration of the Eiffel CodeDom Provider. There can be multiple configurations, each of them being associated with at least one application.
{{note|The Eiffel for ASP.NET installation program will add a shortcut in the start menu to the Eiffel CodeDom Provider Manager. }}
The main dialog of the Eiffel CodeDom Provider Manager is divided into two vertical panes. The left pane contains a list of available configurations while the right pane contains the settings corresponding to the currently selected configuration. Initially the only available configuration is the '''default''' configuration which applies to all applications. The configurable settings are listed below.
==General Settings==
* '''Fail on error''': Checking this box will force the Eiffel Codedom Provider to fail when an error occurs. By default the provider rescues the failure and logs an error but it might be easier for debugging to have the Eiffel CodeDom Provider stop and raise an exception.
* '''Log server''': Server where events should be logged. By default events are logged on the machine running the CodeDom Provider, the corresponding value is a dot ("."). Consult the [[Logging|Logging]] section for additional information on logging.
* '''Log level''': By default only errors are written to the log. It might be useful for debugging purposes to log additional information and/or warnings. This setting also allows to disable logging in case it is not required. Consult the [[Logging|Logging]] section for additional information on logging.
==Compiler Settings==
* '''Default root class''': In the event where the CodeDom tree does not define an entry point, there still needs to be a root class for the Eiffel system to compile properly. If there is an entry point defined in the Codedom tree then this setting is ignored.
* '''Precompile ace file''': This setting, if set, gives the path to the ACE file of the precompile that the CodeDom compiler should use when compiling systems with this configuration. The CodeDom compiler will first check whether the precompile for that ACE file already exists in the precompile cache (See Precompile cache below). If it finds one then it will check whether the ACE file was modified since the precompile was created. If there isn't a corresponding precompile or if the ACE file was modified then the CodeDom compiler will create a new precompile in the precompile cache using the specified ace file. It will then compile the system using the precompile in the cache corresponding to the specified ACE file.
{{note|If for any reason the precompilation fails then the CodeDom compiler will still compile the system but without using any precompile. }}
* '''Metadata cache''': Both the Eiffel CodeDom Provider and the Eiffel compiler require reading from and writing to an Eiffel Metadata Cache. These caches contain information about mapping the .NET types and members names to valid Eiffel identifiers. Because read and write access are required, the application that uses the CodeDom Provider must have write access rights to the Eiffel Metadata Cache folder.
{{note|The Eiffel for ASP.NET installation program will grant write access rights to the Eiffel Metadata Cache folder to the ASPNET user and IIS_WPG group if they exist. ASPNET is the default user account used by the ASP.NET process (aspnet_wp.exe) under Windows XP while IIS_WPG is the default user account used by the ASP.NET process (w3wp.exe) under Windows 2003 Server. }}
{{warning|Changing the Eiffel Metadata Cache folder path will force the Eiffel CodeDom Provider to regenerate the cache content during the next code generation or compilation. This process can take a long time and in particular can take more time than the default timeout for an ASP.NET page. If the Eiffel CodeDom Provider is used together with ASP.NET and if the Eiffel Metadata Cache path has been modified, it is recommended to change the default timeout for the first ASP.NET page containing Eiffel code to be loaded (this can be done by setting the ''HttpServerUtility.ScriptTimeout'' property). }}
* '''Compiler metadata cache''': This cache is used by the Eiffel Codedom Provider Compiler to map .NET types and members names to valid Eiffel identifiers. Please consult '''Metadata cache''' for additional information (the same note and warning apply).
* '''Precompile cache''': If the configuration defines a precompile ace file then the Eiffel CodeDom Provider will create the precompile in the directory specified in this setting. Changing this value will force the Eiffel CodeDom Provider compiler to recreate the precompile in the new directory.
==Assembly Prefixes==
This list associates .NET assemblies with the prefix that will be used for Eiffel class names corresponding to .NET types belonging to the assembly. For example the prefix for the assembly ''System.Xml.dll'' is ''XML_'', this means that the Eiffel class names of all the types in the assembly ''System.Xml.dll'' will all begin with ''XML_''. This is necessary because Eiffel doesn't have a notion of namespace. The default assembly prefixes cannot be modified but new assembly/prefix pairs can be added if necessary.
==Applications==
This last setting will only appear for configurations other than the default configuration. It lists the applications that will use the configuration when they load the Eiffel CodeDom Provider assembly. If an application is not listed in any configuration then it will use the default configuration.
{{note|For a change in an existing configuration to take effect, the process that uses the modified configuration must be restarted. }}
==New Configuration==
New configurations may be created by clicking the ''New'' button or the ''New'' entry in the ''File'' menu. The New Configuration dialog box asks for the name and the path of the configuration. It will create a file with the extension '''.ecd''' ('''E'''iffel '''C'''ode'''D'''om) with the specified name in the directory located at the specified path. Whenever one of the applications listed at the bottom of the New Configuration dialog loads the Eiffel CodeDom Provider, it will use this new configuration.
==Configuration Properties==
Double clicking on the configuration name in the configurations list, clicking the ''Properties'' button or choosing the ''Properties'' menu entry in the ''File'' menu will open the Configuration Properties dialog. This dialog gives the dates of creation and last modification of the configuration as well as the list of applications that use it if it's not the default configuration.
{{seealso|[[Configuration|Configuration]], [[Logging|Logging]] }}

View File

@@ -0,0 +1,45 @@
[[Property:title|eSplitter]]
[[Property:weight|0]]
[[Property:uuid|2cf7249c-fd1e-b8e0-08ab-c2995b2b8227]]
This tool comes in two flavors: a command line only utility ''esplit.exe'' and a graphical tool ''esplitter.exe''. Both applications achieve the same goal: to produce standard Eiffel source files ('''.e''' files) from Eiffel CodeDom Provider generated source files ('''.es''' files).
==Command Line Utility (esplit.exe)==
This utility is located in the ''Codedom\bin'' subfolder of the Eiffel for ASP.NET directory. The command line syntax is:
<code>
Usage: esplit -f=FOLDER [-s -d=DESTINATION -v -h -m=REGEXP -n]
-d, --destination=DESTINATION
Folder where generated Eiffel class files should be created.
If not specified, creates Eiffel class files in same folder as
corresponding Eiffel multi-class file.
-f, --folder=FOLDER
Folder containing Eiffel multi-class files.
-h, --help
Help on using this program.
-m, --match=REGEXP
Regular expression that file name must match to be processed, by default matches all files with extension '.es'.
-n, --nologo
Do not display copyright notice.
-s, --subfolders
Also process files in subfolders.
-v, --version
Version information.</code>
So running:
<code>
esplit -f .</code>
will generate Eiffel source files from all the files with extension '.es' in the current folder and running:
<code>
esplit -f "source" -m "C.*\.es" -d "destination" -s</code>
will generate Eiffel source files from all the files with extension '.es' and whose filename starts with a 'C' located in the 'source' folder and all its subfolders. The Eiffel source files will be generated in the 'destination' folder.
==Graphical Utility (esplitter.exe)==
The graphical utility includes two panes. The first pane allows setting different parameters:
* '''Folder containing Eiffel multi-class file(s)''': this field gives the path to the folder which contains the files to be processed. The button to the right of the field allows to browse for the folder. This field corresponds to the '-f' parameter of the command line utility.
* '''Only process files whose filename matches the following regular expression''': this field corresponds to the '-m' parameter of the command line utility.
* '''Also process files in subfolder''': if this check box is checked then the utility will search for files whose filenames match the regular expression in the destination folder as well as in its subfolders. This check box corresponds to the '-s' switch of the command line utility.
* '''Generate Eiffel class files in the same folder as the Eiffel multi-class files''': checking this radio button is equivalent to not providing a '-d' parameter to the command line utility.
* '''Generate Eiffel class files in the following folder''': The content of the field below this radio button corresponds to the '-d' parameter of the command line utility.
Clicking on the '''Generate''' button switches to the output pane and starts the Eiffel class file generation. The output pane contains the text output resulting from the execution of the tool. It also contains two buttons:
* '''Open Folder''': clicking on this button will open Windows Explorer in the folder where the Eiffel source files were generated.
* '''Exit''': clicking this button will close the application.

View File

@@ -0,0 +1,11 @@
[[Property:title|Eiffel for ASP.NET Tools and Administration]]
[[Property:weight|2]]
[[Property:uuid|960d3d4b-33d0-327f-343d-ad9d5591f07a]]
The Eiffel for ASP.NET delivery comes together with several tools:
* [[Eiffel CodeDom Provider Manager|Eiffel CodeDom Provider Manager]] allows administering the Eiffel CodeDom Provider.
* [[eSplitter|ESplitter]] allows generating standard Eiffel source files ('''.e''' files) from Eiffel CodeDom Provider generated files ('''.es''') files.
* [[Name Mapper|Name Mapper]] allows retrieving the Eiffel identifier corresponding to a .NET type or type member.

View File

@@ -0,0 +1,15 @@
[[Property:title|Name Mapper]]
[[Property:weight|2]]
[[Property:uuid|82691c82-50a5-ed7f-b138-90946d094dae]]
The Name Mapper utility allows retrieving the Eiffel identifier corresponding to a .NET type name or a .NET member name. There are only two input fields in the interface: the .NET type name should be entered in the first one while the .NET member name should be entered in the second one. Once a valid .NET type name is entered in the type name input field, the tool starts searching for the corresponding Eiffel identifier. When the Name Mapper finds the corresponding Eiffel identifier, it automatically fills the .NET member name input combo box with all the member names of the corresponding type. This means that the .NET member type name can be chosen from the combo box entries or typed in (if it's typed in then the tool will autocomplete the member name).
The assemblies the tool will look into for the .NET type whose name was given in the .NET type name input field are listed below the input fields. It is possible to add new assemblies to the list by clicking the ''Add'' button. Assemblies that were added this way can be removed by clicking the ''Remove'' button after selecting the assembly from the list.
{{note|Assemblies that are listed by default cannot be removed. }}
{{note|When adding an assembly and if the assembly has not been consumed (i.e. the XML names mapping files have not been generated in the Eiffel Metadata Cache) then the Name Mapper will consume the assembly, this may take a while. }}
{{seealso|[[Names Mappings|Names Mapping]] }}

View File

@@ -0,0 +1,10 @@
[[Property:title|About the Code Document Object Model (CodeDom)]]
[[Property:weight|0]]
[[Property:uuid|46136373-34bb-94b7-1f7b-934d584cf637]]
CodeDom stands for the '''Code Document Object Model'''. CodeDom allows for representing source code in an abstract data structure. Such a representation is called a '''CodeDom tree''' as the underlying data structure uses a tree paradigm. This abstract representation can then be generated into different programming languages. Each language vendor provides its implementation of the CodeDom interfaces, this implementation is called a '''CodeDom Provider'''. Programmers can then build tools that can work with many different languages without having to know about each one, instead they just delegate code generation to each CodeDom Provider.
The CodeDom interfaces also expose types and methods that allow for parsing source code and creating the corresponding CodeDom. The current implementation of the Eiffel CodeDom Provider does not support parsing. Code generation is a much more popular useage of the CodeDom and the current version focuses on this aspect of the technology.

View File

@@ -0,0 +1,19 @@
[[Property:title|Common Scenarios]]
[[Property:weight|7]]
[[Property:uuid|15334d95-2ef5-6e1b-1754-051342bb7290]]
==ASP.NET==
Probably the most common use of the CodeDom technology is via Internet Information Services (IIS) and ASP.NET. The installation of the Eiffel for ASP.NET will configure the machine so ASP.NET pages can be written in Eiffel. Consult the [[Eiffel for ASP.NET Installation|Eiffel for ASP.NET documentation]] for details on how to write ASP.NET Eiffel pages.
==WSDL==
Another use of the CodeDom technology is via the WSDL utility. This utility is part of the .NET Framework SDK and is a common line application that can be used to automatically generate stub source code for any Web Service described by a Web Service Description Language (WSDL) file. It is possible to tell the utility which CodeDom Provider to use via the command line as follows:
<code>
Wsdl /language:"EiffelSoftware.CodeDom.CodeDomProvider, EiffelSoftware.CodeDom, Version=2.0.1.1402, Culture=neutral, PublicKeyToken=def26f296efef469"<br/>
http://api.google.com/GoogleSearch.wsdl</code>
{{note|The version number used above might differ depending on the version of the Eiffel CodeDom Provider dll installed on your system. }}
{{note|The example above uses the Google web service, the corresponding URL is correct at the time of writing but there is no guarentee it won't change (or be removed) in the future. }}
This will generate a file with the extension '''.es''' which contains multiple Eiffel class definitions. Compiling this file will require using the CodeDom compiler (programmatically via the CodeDom <code>ICodeCompiler</code> interface) or using the [[eSplitter|eSplitter]] tool to generate standard Eiffel source files ('''.e''' files) that can then be compiled by the standard Eiffel compiler.

View File

@@ -0,0 +1,13 @@
[[Property:title|Configuration]]
[[Property:weight|3]]
[[Property:uuid|2d885f05-adcc-d8da-6515-4568fc76bcf6]]
The Eiffel Codedom Provider uses XML configuration files that define additional settings specific to Eiffel. Such settings include whether to fail on error, what events to log, where to log them etc... Each application can define its own configuration to be used when it loads the Eiffel CodeDom Provider. If an application is not associated with a configuration file then a default configuration is used.
The association between applications and configurations as well as the actual settings the configuration defines can be set in the [[Eiffel CodeDom Provider Manager|Eiffel CodeDom Provider Manager]] . Run ''ecdpman.exe'' to start the manager.
{{note|The Eiffel for ASP.NET installation program will add a shortcut in the start menu to the Eiffel CodeDom Provider Manager. }}
{{seealso|[[Eiffel CodeDom Provider Manager|Eiffel CodeDom Provider Manager]] , [[Logging|Logging]] , [[Required Permissions|Required permissions]] }}

View File

@@ -0,0 +1,32 @@
[[Property:title|Eiffel Implementation]]
[[Property:weight|7]]
[[Property:uuid|3f945c36-521e-cd71-fc7b-d549a6c05a04]]
There are a few topics specific to the implementation of the Eiffel CodeDom Provider that are worth mentioning.
==Multiple Classes File==
The Eiffel compiler expects that there is only one class per source file (file with extension '''.e'''), however the CodeDom interface specification requires multiple classes to be generated in the same file (actually in the same ''stream''). The Eiffel CodeDom Provider code generator generates files with the extension '''.es''' which may contain multiple class definitions. Each class definition is separated with a special marker that the Eiffel CodeDom Provider compiler will parse to create multiple '''.e''' files - each containing a single class definition - prior to calling the command line Eiffel compiler.
{{note|Only the Eiffel CodeDom Provider compiler knows how to handle '''.es''' files. The standard Eiffel compilers can only parse '''.e''' files. }}
Eiffel for ASP.NET includes the [[eSplitter|eSplitter]] utility which can 'split' Eiffel multi-class files ('''.es''' files) into single class files ('''.e''' files).
==Inheritance Snippet==
Any type defined in a CodeDom tree to be consumed by the Eiffel CodeDom Provider may include one (and only one) snippet member that includes an inheritance clause declaration. This ''inheritance snippet'' must start with the keyword '''inherit''' and follows the Eiffel syntax for inheritance clauses. All the feature adaptations available in the Eiffel programming language may be used in such a snippet ('''rename''', '''export''', '''undefine''', '''redefine''', '''select''').
{{note|The CodeDom tree itself might define additional inheritance clauses in which case the Eiffel CodeDom Provider will merge the snippet and the implicit clauses in the generated source file. }}
==Indexing Snippet and Precompiled Libraries==
Another interesting snippet member is the ''indexing clause snippet'' which must start with the '''indexing''' keyword and follows the Eiffel syntax for indexing clauses. This snippet may include the indexing clause '''precompile_definition_file''' which can be used to specify the path to the precompiled library ACE file to be used by the Eiffel CodeDom Compiler. This is specially useful in ASP.NET pages where each page can specify which precompiled ACE file to use when compiling it. This path will be used instead of the path defined in the [[Configuration|configuration file]].
{{note|Only one class per compile unit should define a path to the precompiled library ACE file. If more than one class contain a '''precompile_definition_file''' indexing clause then there is no guarentee on which one the Eiffel CodeDom Compiler will use. }}
==Eiffel Configuration==
There are several Eiffel specific settings that can be set in the Eiffel CodeDom Provider which will affect the generated code as well as the CodeDom compiler behavior. These settings are covered in the [[Configuration|Configuration]] section.
{{seealso|[[eSplitter|eSplitter]], [[Configuration|Configuration]] }}

View File

@@ -0,0 +1,5 @@
[[Property:title|The Eiffel CodeDom Provider]]
[[Property:weight|0]]
[[Property:uuid|0b45f31f-83ea-6301-9017-7b78c6827772]]
The Eiffel CodeDom Provider provides an implementation of the CodeDom Provider generation and compilation interfaces defined in the System.CodeDom namespace of the .NET Framework. This documentation includes the following sections:

View File

@@ -0,0 +1,19 @@
[[Property:title|Installation]]
[[Property:weight|1]]
[[Property:uuid|b6197932-4bcb-c79b-afe2-1a8f36dbbd7c]]
For certain tools (including ASP.NET) to detect the availability of a CodeDom Provider, the corresponding assembly name must be listed in the .NET machine wide configuration file typically located in:
<code>
%SYSTEM_DRIVE%\Windows\Microsoft.NET\Framework\vx.x.xxxx\CONFIG\machine.config</code>
(where vx.x.xxxx corresponds to the .NET Framework version number). The available CodeDom Providers are listed under the ''<compilers>'' XML node. The Eiffel CodeDom Provider implements a.NET Installer class so that should you need to add the Eiffel CodeDom Provider to the machine configuration file, simply run the .NET SDK command line utility ''InstallUtil'' as follows:
<code>
InstallUtil EiffelSoftware.Codedom.dll</code>
Conversely, should the Eiffel Codedom Provider not be required anymore, running the following command line will remove it from the ''machine.config'' file:
<code>
InstallUtil /u EiffelSoftware.Codedom.dll</code>
{{note|The '''Eiffel for ASP.NET''' installation program will take care of registering and unregistering the Eiffel CodeDom Provider properly. }}

View File

@@ -0,0 +1,10 @@
[[Property:title|Limitations]]
[[Property:weight|8]]
[[Property:uuid|6d8ab90d-f051-5010-55df-218a020d9cb5]]
==Generation Only==
The current implementation of the Eiffel CodeDom Provider does not support parsing Eiffel source code to produce a CodeDom tree. Only code generation and compilation are supported in the current release.
==Managed Code Only==
Only managed code can be generated or compiled by the Eiffel CodeDom Provider. This means that the CodeDom tree being compiled cannot include snippet members which use or define Eiffel external clauses. If the system requires access to external methods, they should be defined in a precompiled library (see [[Configuration|Configuration]] ).

View File

@@ -0,0 +1,21 @@
[[Property:title|Logging]]
[[Property:weight|4]]
[[Property:uuid|d425684b-687c-aee6-25fa-650e5885e014]]
The Eiffel CodeDom Provider may be configured (via the [[Eiffel CodeDom Provider Manager|Eiffel Codedom Provider Manager]] ) to log information, warnings and/or errors in the Windows Event Log. Logging may be useful for a number of reasons, some of them are:
* To detect which CodeDom interface method is called and when it's called. This is particularly useful when the source code for the CodeDom consumer (e.g. ASP.NET) is not available.
* To locate the source of a problem when the code generated by the Eiffel CodeDom Provider is incomplete or incorrect. This may happen if the CodeDom tree given to the Eiffel CodeDom Provider uses one of the unsupported constructs as listed in the topic [[Supported Constructs|Supported Constructs]] .
* To detect a problem in a CodeDom tree. The logs will help in locating the location of the problem as they include contextual information on the node where the error occurred.
==Log Details==
There are three types of events that can be logged: information events, warnings and errors:
* Information events include calls to CodeDom interface methods and other events that will not affect the execution of the Eiffel CodeDom Provider
* Warnings include events that will not prevent the CodeDom Provider from running but that may affect the results. For example if a CodeDom tree element references a .NET entity that the Eiffel CodeDom Provider cannot find then it will generate a default Eiffel name by running the default formatting algorithm. This may produce code that does not compile if the Eiffel name of the entity does not correspond to the formatted .NET name (for example if the entity is a type and the type's assembly has a non-empty prefix).
* Errors include events that will force the execution of the Eiffel CodeDom Provider to stop. By default the Eiffel CodeDom Provider simply stops and returns an error, it is possible however to configure it so that an exception is raised.
==Log Location==
All the Eiffel CodeDom Provider events are logged into the Windows '''System''' Log. This log can be viewed via the Windows administrative tool ''Event Viewer''. The source for the events raised by the Eiffel CodeDom Provider is ''Eiffel CodeDom Provider''. By default all the events are logged on the machine running the Eiffel CodeDom Provider but it is possible to change its configuration so that the events are logged on a different machine (see [[Required Permissions|Required permissions]] ).
{{seealso|[[Eiffel CodeDom Provider Manager|Eiffel CodeDom Provider Manager]] , [[Supported Constructs|Supported constructs]] , [[Required Permissions|Required permissions]] }}

View File

@@ -0,0 +1,26 @@
[[Property:title|Required Permissions]]
[[Property:weight|6]]
[[Property:uuid|f55af6a0-b896-12b7-fe4a-ebb1787731e5]]
The account running the Eiffel CodeDom Provider might have restricted permissions such as when used through ASP.NET. This section aims at defining the security permissions required for the execution of the Eiffel CodeDom Provider.
==Eiffel Metadata Cache==
Both when generating and compiling source code, the Eiffel CodeDom Provider needs to read and write from and to the Eiffel Metadata Cache. This repository stores the mapping information between .NET and Eiffel names for both types and their members. By default the Eiffel Metadata Cache is located in the ''Assemblies'' subfolder of the Eiffel CodeDom Provider directory.
{{note|The Eiffel for ASP.NET installation program will grant read and write access to the Eiffel Metadata Cache folder for the ''ASPNET'' (default ASP.NET worker process account on Windows XP Professional) and the ''IIS_WPG'' (default ASP.NET worker process account on Windows Server 2003) accounts. }}
The path to the Eiffel Metadata Cache folder might be changed via the [[Eiffel CodeDom Provider Manager|Eiffel CodeDom Provider Manager]] , make sure the new folder can be read from and written to by the account running the process that uses the Eiffel CodeDom Provider.
==Precompile Cache==
The same requirements apply to the Precompile Cache folder. By default the Precompile Cache folder is located in the ''Precompile'' subfolder of the Eiffel CodeDom directory.
{{note|The Eiffel for ASP.NET installation program will grant read and write access to the Precompile Cache folder for the ''ASPNET'' (default ASP.NET worker process account on Windows XP Professional) and the ''IIS_WPG'' (default ASP.NET worker process account on Windows Server 2003) accounts. }}
As with the Eiffel Metadata Cache folder, it is possible to change the location of the Precompile Cache folder but the process running the Eiffel CodeDom Provider must always have read and write access to the folder.
==Logging==
Logging requires registry read access as well as event log write access. By default, the ASP.NET worker process does not have these permissions. The easiest way to grant the required permissions to the ASP.NET worker process is by using ASP.NET impersonation. This mechanism allows the ASP.NET worker process to run under a different account. This is done by providing a ''web.config'' file in the root folder of the ASP.NET application. The content of the configuration file needs to include the following declaration:
<code>
<configuration>
<system.web>
<identity impersonate="true" userName="Username" password="Password"/>
</system.web>
</configuration></code>
where <code>Username</code> is the name of an account which has all the required permissions and <code>Password</code> the corresponding password. Refer to the .NET Framework SDK documentation for additional information on ASP.NET impersonation.
The solution described above might not be acceptable on a production web server. However, it is possible to configure the Eiffel CodeDom Provider to log events on a different machine (see [[Eiffel CodeDom Provider Manager|Eiffel CodeDom Provider Manager]] ). The log machine should grant the appropriate permissions to the impersonated account for logging and could only be accessible through the web server. This setting would avoid having to grant additional permissions to the ASP.NET worker process account on the web server while still enabling logging.

View File

@@ -0,0 +1,37 @@
[[Property:title|Supported Constructs]]
[[Property:weight|2]]
[[Property:uuid|99e15890-75a9-8b76-d0b6-b9be419be5ce]]
Since not every language might support all the constructs CodeDom can represent, there needs to be a way for the CodeDom Provider to specify which constructs are supported and which ones are not. This is done through the <code>System.Codedom.Compiler.ICodeGenerator</code> interface using method <code>Supports</code>.<br/>
This method takes a flag corresponding to the CodeDom contruct the caller is interested in and returns a boolean value indicating whether or not the construct is supported. In the Eiffel CodeDom Provider implementation there is a third category of constructs which will be reported as supported since the provider will generate valid Eiffel code for them but that should be distinguished from other "truly" supported constructs as the generated code will not correspond to the .NET equivalent of the construct.<br/>
Let's take an example: Enum declarations are supported by the Eiffel CodeDom Provider because the generated Eiffel code will correctly make use of the values defined in the enum. However there is no such thing as an enum type in Eiffel so there won't be a corresponding .NET enum type in the generated assembly. Such constructs are said to be "non-roundtripable" because even if the Eiffel CodeDom Provider supported parsing source code, the corresponding CodeDom tree would not include the constructs like the initial CodeDom did.
The lists of supported, supported without roundtrip and unsupported constructs for the Eiffel CodeDom Provider are as follows:
'''Supported constructs''':
* Arrays of arrays
* Assembly attributes
* Complex expressions
* Declare value types
* Entry point method
* Multiple interface members
'''Supported constructs (no roundtrip)''':
* Declare enums
* Declare events
* Declare interfaces
* Nested types
* Public static members
* Reference parameters
* Try catch statements
'''Unsupported constructs''':
* Chained constructor arguments
* Declare delegates
* Goto statements
* Multidimensional arrays
* Parameter attributes
* Return type attributes
* Static constructors
* Win32 resources

View File

@@ -0,0 +1,17 @@
[[Property:modification_date|Fri, 29 Sep 2023 11:57:59 GMT]]
[[Property:publication_date|Fri, 29 Sep 2023 11:57:59 GMT]]
[[Property:title|Eiffel for ASP.NET Documentation]]
[[Property:weight|6]]
[[Property:uuid|158e298e-e4b3-3246-651c-557f2f630957]]
{{Caution|This section concerns only Eiffel .NET Framework, and not .NETCore}}
CodeDom is a Microsoft .NET technology which allows representing source code programatically so that it may be rendered in different languages. The Eiffel CodeDom Provider is installed through Eiffel for ASP.NET which is available for download for free on the Eiffel Software web site ( [http://www.eiffel.com http://www.eiffel.com] ). <br/>
The following documents cover different aspects of the Eiffel CodeDom Provider:
* [[Writing ASP.NET pages in Eiffel|Writing ASP.NET pages in Eiffel]] covers topics related to writing Eiffel pages in ASP.NET.
* The [[The Eiffel CodeDom Provider|Eiffel CodeDom Provider]] documentation focuses on the Eiffel CodeDom Provider per se. Read this documentation if you intend on using the Eiffel CodeDom Provider via a different mean than ASP.NET (e.g. to generate Web Services stubs using Microsoft's WSDL utility).
* Finally, [[Eiffel for ASP.NET Tools and Administration|Eiffel for ASP.NET Tools and Administration]] covers the Eiffel CodeDom Provider Manager, the eSplitter and the Name Mapper tools that are included in the Eiffel for ASP.NET delivery.

View File

@@ -0,0 +1,15 @@
[[Property:title|CodeDom: Getting Started]]
[[Property:weight|0]]
[[Property:uuid|06e0c7ae-6d25-a0ef-81e6-2ee3c95fe4a1]]
== Prerequisites ==
Before you start writing ASP.NET pages in Eiffel, you should be familiar with the ASP.NET technology itself. If you haven't already, it is strongly recommended that you follow the ASP.NET quickstarts available online at [http://samples.gotdotnet.com/quickstart/aspplus/ http://samples.gotdotnet.com/quickstart/aspplus/] . Apart from a few Eiffel specific points described in [[Using Eiffel (to write ASP.NET pages)|Using Eiffel]], writing ASP.NET pages in Eiffel follows the same rules as writing ASP.NET pages in any other language.
Writing ASP.NET pages in Eiffel also requires to be familiar with the Eiffel programming language itself. There are no changes in the language when using it to write ASP.NET pages: the same parser and compiler are used to parse and compile standard Eiffel source code and ASP.NET generated source code. Documentation on the Eiffel programming language can be found on the [http://docs.eiffel.com Eiffel documentation web site] .
==Samples==
The '''Samples''' folder of the Eiffel for ASP.NET delivery includes ASP.NET pages written in Eiffel. To run the samples you can either click on the corresponding link in the ''Start'' menu or open the page [http://localhost/EiffelSample http://localhost/EiffelSample] in your internet browser. Each sample comes with an extensively commented source code.
{{note|The samples will only be available if IIS was installed prior to installing Eiffel for ASP.NET. }}

View File

@@ -0,0 +1,17 @@
[[Property:title|Eiffel for ASP.NET Installation]]
[[Property:weight|-1]]
[[Property:uuid|c9371a07-12fb-bdb2-b076-3da3c0ec8da6]]
Eiffel for ASP.NET is available for downloading for free at [http://www.eiffel.com http://www.eiffel.com] . Simply run the file and follow the installer instructions. It is recommended that Internet Information Services (IIS) be deployed on the machine prior to installing Eiffel for ASP.NET. If IIS is not deployed then the installation program will display a warning message box. Click '''ignore''' to keep installing the product.
Without IIS, ASP.NET pages cannot be loaded and thus the samples will not be installed. It might still be useful to install Eiffel for ASP.NET without IIS if the Eiffel CodeDom Provider is going to be used through other [[Common Scenarios|scenarios]]. If IIS is available then the installer will open an Eiffel ASP.NET page at the end of the installation process. This page contains links to the documentation and samples. The installer will also put links to these documents in the ''Start'' menu under 'Programs\Eiffel for ASP.NET x.x' where 'x.x' corresponds to the version number of Eiffel for ASP.NET.
==System Requirements==
* Windows 2000 Server or Advanced Server with Service Pack 2, Windows XP Professional or 64-Bit Edition, or one of the Windows Server 2003 family products.
* .NET Framework (1.0 or 1.1)
* Internet Information Services with ASP.NET (optional see above)
==ASP.NET Installation==
Please consult the corresponding documentation (available online at [http://msdn.microsoft.com/asp.net/ http://msdn.microsoft.com/asp.net/] ) for configuring ASP.NET properly. In particular, be aware that by default ASP.NET is disabled on Windows 2003 Server.

View File

@@ -0,0 +1,5 @@
[[Property:title|Writing ASP.NET pages in Eiffel]]
[[Property:weight|-1]]
[[Property:uuid|7027e7f3-38e1-5e26-c936-20aea0e0c205]]
Eiffel for ASP.NET allows running ASP.NET pages written in Eiffel. It should be installed on both the web server and the developer's machine. This documentation includes the following sections:

View File

@@ -0,0 +1,34 @@
[[Property:title|Names Mappings]]
[[Property:weight|4]]
[[Property:uuid|fa212869-ffb0-0a6a-cbd0-7a184b11491d]]
Maybe the most striking difference when writing pages in Eiffel comes from the name of the .NET types and methods. Because of different naming conventions, overloading and differences in identifier validity rules, .NET identifiers cannot be mapped directly to Eiffel identifiers. As a consequence, the Eiffel compiler creates XML mapping files in the ''Eiffel Metadata Cache''. These files are created only once for each referenced assembly.
{{note|The ASP.NET installation program pre-generates the Eiffel Metadata Cache for all assemblies required by ASP.NET by default. }}
The name mapping algorithm is quite complex but it is possible to guess the Eiffel identifier from the .NET identifier in most cases. The following simple steps can be followed to retrieve the Eiffel identifier corresponding to a .NET type:
# Only the simple type name is used, the namespace isn't used by the Eiffel identifier:
<code>System.Xml.NameTable -> NameTable</code>
# Underscores are introduced in between words (prior to upper case letters other than the first character):
<code>NameTable -> Name_Table</code>
# Eiffel class names are always upper case:
<code>Name_Table -> NAME_TABLE</code>
# If the assembly containing the type is associated with a prefix in the Eiffel system then the prefix gets prepended to the name:
<code>NAME_TABLE -> XML_NAME_TABLE</code>
The steps to follow to retrieve the Eiffel identifier corresponding to a .NET member are simpler:
# For property getters, the "get_" prefix is removed:
<code>get_MaxOccursString -> MaxOccursString</code>
# Underscores are introduced in between words (prior to upper case letters other than the first character):
<code>MaxOccursString -> Max_Occurs_String</code>
# Eiffel feature names are always lower case:
<code>Max_Occurs_String -> max_occurs_string</code>
Although these simplified steps will work in most cases there are certain .NET identifiers that require additional manipulation to be translated into Eiffel. The [[Name Mapper|Name Mapper]] utility should be used when such cases arise.
{{seealso|[[Name Mapper|Name Mapper]] }}

View File

@@ -0,0 +1,21 @@
[[Property:title|Using Eiffel (to write ASP.NET pages)]]
[[Property:weight|3]]
[[Property:uuid|c8e2ffa7-cfa8-0b4c-4b5e-e1f386b7ab11]]
==Inheritance==
Eiffel handles inheritance in a different way than most languages. In C# or VB.NET the behavior of a newly introduced member in a class hierarchy is defined as part of the member declaration itself (for example C# will precede the member declaration with the keyword ''override'' to accomplish the same result as an Eiffel ''redefine'' clause). In Eiffel, classes are equipped with an inheritance clause which centralizes all the feature adaptations.
As a result, Eiffel for ASP.NET introduces '''inheritance snippets'''. Each Eiffel ASP.NET page may include at most one inheritance snippet. Such a snippet must start with the '''inherit''' keyword and may then list any valid Eiffel feature adaptation.
==String and Array Manifest Constants==
The Eiffel programming language supports using '''manifest constants''' in source code. The type of these constants is inferred by the Eiffel compiler. There are two manifest constant types that require special attention on .NET: string and array. Because the Eiffel and the .NET types differ, writing code using string or array manifest constants requires additional care.
* '''Strings''': Eiffel strings cannot be mapped directly to .NET strings because Eiffel strings are ''mutable'': an Eiffel string can be resized while the size of a .NET string is set for the lifetime of the object. However, the Eiffel class <eiffel>STRING</eiffel> defines conversion features that will automatically convert to and from a .NET string. So when the compiler expects an object of type ''System.String'' where an object of type <eiffel>STRING</eiffel> is used, it will automatically call the right conversion routine.<br/>
However if an instance of <eiffel>STRING</eiffel> is passed as an argument to an overloaded .NET function that can accept both an instance of ''System.Object'' or an instance of ''System.String'' then the compiler will produce an error since it has no means to know which type the Eiffel object should be converted to (any Eiffel object converts to ''System.Object''). When this happens, the conversion function <eiffel>to_cil</eiffel> must be explicitely called.
* '''Arrays''': The exact same problem also arises with arrrays. Instances of the Eiffel class <eiffel>ARRAY</eiffel> are different from instances of <eiffel>NATIVE_ARRAY</eiffel> which correspond to the .NET array type. There are however features in <eiffel>ARRAY</eiffel> that will convert to and from .NET arrays. If an overloaded .NET function can take an argument of type ''System.Object'' or ''System.Array'', any instance of <eiffel>ARRAY</eiffel> given to it must first be converted explicitly to a .NET array by calling the <eiffel>to_cil</eiffel> function.
==Compilation and Timeouts==
Eiffel compilations can take longer than the default timeouts set in ASP.NET. In particular ASP.NET will run batch compilations on the entire directory that is being accessed by IIS each time the time stamp of that directory changes. If the batch compilation takes longer than the ''batchTimeout'' property defined in the machine wide configuration file (''machine.config'') then ASP.NET will start another compilation just for the requested file. This can be quite resource intensive for the Web server and thus it might be beneficial to increase the default value of 15 seconds for ''batchTimeout''.