mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 23:02:28 +01:00
Updated wikipage Eiffel for .NET Integration. (Signed-off-by:roc_admin).
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2404 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
[[Property:modification_date|Wed, 27 Sep 2023 20:16:10 GMT]]
|
||||
[[Property:modification_date|Fri, 29 Sep 2023 08:00:38 GMT]]
|
||||
[[Property:publication_date|Wed, 27 Sep 2023 19:33:07 GMT]]
|
||||
[[Property:title|Eiffel for .NET Integration]]
|
||||
[[Property:weight|3]]
|
||||
[[Property:uuid|fe8a6a7d-4590-0db2-d59a-307082b18ecc]]
|
||||
==Differences between Eiffel and Eiffel for .NET==
|
||||
|
||||
===Limitation of Eiffel for .NET in version 5. 5===
|
||||
===Limitation of Eiffel for .NET in version 23.09===
|
||||
|
||||
Most of the Eiffel mechanisms are supported in 5. 5. All missing features listed below are planned for addition in future releases:
|
||||
* No creation of Eiffel expanded class support
|
||||
* Partial implementation of generic conformance (same as what was supported up to and including the 4.2 release of the Eiffel development environment).
|
||||
Most of the Eiffel mechanisms are supported in 23.09.
|
||||
|
||||
Eiffel for .NET supports:
|
||||
* Multiple Inheritance
|
||||
@@ -26,7 +24,7 @@ The following syntax can be used to declare .NET custom attributes on Eiffel ent
|
||||
empty: BOOLEAN
|
||||
note
|
||||
description: "Is Current empty?"
|
||||
metadata: create {OBSOLETE_ATTRIBUTE}.make_obsoleteattribute_1 ("Use `is_empty' instead") end
|
||||
metadata: create {OBSOLETE_ATTRIBUTE}.make ("Use `is_empty' instead") end
|
||||
obsolete
|
||||
"Use is_empty instead"
|
||||
do
|
||||
@@ -55,7 +53,7 @@ Another advantage of Eiffel for .NET's implementation of covariance is that it c
|
||||
|
||||
===Genericity===
|
||||
|
||||
The CLR does not support generics at all, so that the following Eiffel for .NET classes:
|
||||
The .NET Framework does not support generics at all, so that the following Eiffel for .NET classes:
|
||||
* <code>LIST [ANY]</code>
|
||||
* <code>LIST [INTEGER]</code>
|
||||
|
||||
@@ -65,6 +63,8 @@ will actually be generated as:
|
||||
|
||||
Meaning that if one wants to reuse an Eiffel generic class from another language than Eiffel for .NET, one has to use either <code>LIST_ANY</code> or <code>LIST_Int32</code>.
|
||||
|
||||
WARNING: The .NET Core has support for generics, however this is not yet integrated by Eiffel .NET (it will be part of future releases).
|
||||
|
||||
===Enum types===
|
||||
|
||||
Eiffel for .NET supports .NET enum types implicitly. From the point of view of Eiffel, they are just considered as expanded classes. The only difference is in the code generation. Eiffel for .NET cannot declare new enum types yet.
|
||||
@@ -73,19 +73,20 @@ Eiffel for .NET supports .NET enum types implicitly. From the point of view of E
|
||||
|
||||
Eiffel does not have the notion of `byref` argument passing. At the moment, Eiffel for .NET cannot call nor can it redefine a feature that has a byref argument.
|
||||
|
||||
==Eiffel Compatibility with .NET Core 6 and Above: Current Limitations ==
|
||||
==Eiffel Compatibility with .NETCore 6.0 and Above ==
|
||||
|
||||
===Limitations with Generics Classes and Features===
|
||||
|
||||
Currently, Eiffel does not support the use of `Generics` Classes and `Features` when consuming .NET assemblies.
|
||||
And the compiler does not yet use .NET generic for code generation
|
||||
|
||||
==== Workaround====
|
||||
|
||||
In some cases, it's possible to create a C# library to access these features using a `Facade` pattern. However, there are instances where creating a Facade is not feasible, such as with `Avalonia` or `EntityFramework`.
|
||||
In some cases, it's possible to create a C# library to access these features using a `Facade` pattern. However, there are instances where creating a Facade is not feasible, such as with `Avalonia UI` or `EntityFramework` where it is required to use generic to instantiate main components.
|
||||
|
||||
===Limitations with Init Only Setters===
|
||||
===Limitations with "init" Only Setters===
|
||||
|
||||
Eiffel currently does not support the special `init` property that's only initialized in a block of code as part of the object initialization. More details can be found in the [https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/init C# 9.0 proposal]
|
||||
Eiffel currently does not support the special `init` property that is only initialized in a block of code as part of the object initialization. More details can be found in the [https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/init C# 9.0 proposal]
|
||||
|
||||
====Workaround====
|
||||
|
||||
@@ -102,23 +103,23 @@ As a workaround, you can execute the application from the command line. Use the
|
||||
|
||||
===Debugging .NET Applications from EiffelStudio: Limitations===
|
||||
|
||||
At the moment, it is not possible to debug an Eiffel Application directly from EiffelStudio.
|
||||
At the moment, EiffelStudio does not provide any support for debugging Eiffel .NETCore directly from the IDE.
|
||||
|
||||
====Workaround====
|
||||
|
||||
A potential solution is to utilize the C# wrapper projected generated by the code generator. This tool generates a wrapper for the current project, which you can open (as a csproj file) using Visual Studio. From there, you can configure it to debug the code.
|
||||
A potential solution is to use the C# wrapper project generated by the Eiffel compiler (in W_code or F_code directory). VisualStudio can open this C# wrapper (via the associated `.csproj` file), and thus the associated Eiffel output (dll or exe), and after configuring Debugging profile within VisualStudio , it is possible to debug the code.
|
||||
|
||||
|
||||
===Eiffel.NET Types of SDKs: Limitations===
|
||||
===Eiffel .NETCore Types of SDKs: Limitations===
|
||||
|
||||
In the current version, Eiffel.NET does not support different types of SDKs such as `Microsoft.NET.Sdk.Web`. The generated wrapper only supports `Microsoft.NET.Sdk`.
|
||||
In the current version, Eiffel .NETCore does not support directly different types of SDKs such as `Microsoft.NET.Sdk.Web`. The generated C# wrapper only target `Microsoft.NET.Sdk`.
|
||||
|
||||
====Workaround====
|
||||
|
||||
For other types of applications like Web APIs, you need to manually copy a `.csproj` file with the required SDKs and package dependencies. This allows the application to run and, if necessary, be debugged using VisualStudio.
|
||||
For other types of applications like Web APIs, you need to manually provide a `.csproj` file with the required SDKs and package dependencies. This allows the application to run and, if necessary, use VisualStudio to debug.
|
||||
|
||||
|
||||
==Publishing the Eiffel Solution: Using the Generated Wrapper==
|
||||
==Publishing the Eiffel Solution: Using the Generated C# Wrapper==
|
||||
|
||||
To publish the Eiffel solution, it's necessary to use the generated wrapper. This allows the solution to be published using the `dotnet` tool.
|
||||
To publish the Eiffel solution on current platform or targeting other platform, use the `dotnet` tool on the generated C# wrapper project.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user