From de6f36a55a5617e51ca7d580fee80fde756b5a18 Mon Sep 17 00:00:00 2001 From: eiffel-org Date: Wed, 27 Sep 2023 20:16:11 +0000 Subject: [PATCH] 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 --- .../eiffel-net-integration.wiki | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/documentation/23.09/solutions/dotnet/eiffel-net-language/eiffel-net-integration.wiki b/documentation/23.09/solutions/dotnet/eiffel-net-language/eiffel-net-integration.wiki index 71c963ef..5d7f7b9c 100644 --- a/documentation/23.09/solutions/dotnet/eiffel-net-language/eiffel-net-integration.wiki +++ b/documentation/23.09/solutions/dotnet/eiffel-net-language/eiffel-net-integration.wiki @@ -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 empty . The custom attribute defined by OBSOLETE_ATTRIBUTE 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 note clause metadata. The definition consists of a creation expression that creates the custom attribute with the right parameters. Using the metadata tag is the most general way of applying a custom attribute. There are however some variations that are explained below: -*metada: most general way, it applies a custom attribute to both the class and interface generated by the Eiffel compiler. +*metadata: most general way, it applies a custom attribute to both the class and interface generated by the Eiffel compiler. *class_metadata: applies only to the class generated by the Eiffel compiler (mostly for advanced users). *interface_metadata: applies only to the interface generated by the Eiffel compiler (mostly for advanced users). *property_metadata: 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 `. +===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.