mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 14:52:03 +01:00
Fixed typo
Updated wikipage Eiffel for .NET Integration. (Signed-off-by:javier). git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2402 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
[[Property:modification_date|Wed, 27 Sep 2023 20:16:10 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]]
|
||||
@@ -35,7 +37,7 @@ The following syntax can be used to declare .NET custom attributes on Eiffel ent
|
||||
The previous example shows the declaration of the obsolete feature <code> empty </code> . The custom attribute defined by <code>OBSOLETE_ATTRIBUTE</code> is used to ensure that any consumer of the resulting assembly will see the feature as being obsolete. The custom attribute is defined in the <code>note</code> clause <code>metadata</code>. The definition consists of a creation expression that creates the custom attribute with the right parameters.
|
||||
|
||||
Using the <code>metadata</code> tag is the most general way of applying a custom attribute. There are however some variations that are explained below:
|
||||
*<code>metada</code>: most general way, it applies a custom attribute to both the class and interface generated by the Eiffel compiler.
|
||||
*<code>metadata</code>: most general way, it applies a custom attribute to both the class and interface generated by the Eiffel compiler.
|
||||
*<code>class_metadata</code>: applies only to the class generated by the Eiffel compiler (mostly for advanced users).
|
||||
*<code>interface_metadata</code>: applies only to the interface generated by the Eiffel compiler (mostly for advanced users).
|
||||
*<code>property_metadata</code>: applies a custom attribute to the associated property generated by the Eiffel compiler for a query.
|
||||
@@ -71,6 +73,52 @@ 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 ==
|
||||
|
||||
===Limitations with Generics Classes and Features===
|
||||
|
||||
Currently, Eiffel does not support the use of `Generics` Classes and `Features` when consuming .NET assemblies.
|
||||
|
||||
==== 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`.
|
||||
|
||||
===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]
|
||||
|
||||
====Workaround====
|
||||
|
||||
A potential workaround is to create a C# library that uses a Factory pattern to build the required instance.
|
||||
|
||||
===Executing .NET Applications from EiffelStudio: Limitations===
|
||||
|
||||
Currently, some types of applications cannot be executed directly from the EiffelStudio IDE. For example Web APIs.
|
||||
|
||||
====Workaround====
|
||||
|
||||
As a workaround, you can execute the application from the command line. Use the `dotnet` tool with the following syntax: `dotnet <app_name>`.
|
||||
|
||||
|
||||
===Debugging .NET Applications from EiffelStudio: Limitations===
|
||||
|
||||
At the moment, it is not possible to debug an Eiffel Application directly from EiffelStudio.
|
||||
|
||||
====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.
|
||||
|
||||
|
||||
===Eiffel.NET 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`.
|
||||
|
||||
====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.
|
||||
|
||||
|
||||
==Publishing the Eiffel Solution: Using the Generated 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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user