mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 23:32:42 +01:00
Author:manus
Date:2009-12-07T22:28:01.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@367 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -24,7 +24,7 @@ The following syntax can be used to declare .NET custom attributes on Eiffel ent
|
||||
empty: BOOLEAN
|
||||
note
|
||||
description: "Is Current empty?"
|
||||
attribute: create {OBSOLETE_ATTRIBUTE}.make_obsoleteattribute_1 ("Use `is_empty' instead") end
|
||||
metadata: create {OBSOLETE_ATTRIBUTE}.make_obsoleteattribute_1 ("Use `is_empty' instead") end
|
||||
obsolete
|
||||
"Use is_empty instead"
|
||||
do
|
||||
@@ -32,7 +32,14 @@ The following syntax can be used to declare .NET custom attributes on Eiffel ent
|
||||
end
|
||||
</code>
|
||||
|
||||
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>attribute</code>. The definition consists of a creation expression that creates the custom attribute with the right parameters.
|
||||
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>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.
|
||||
*<code>assembly_metadata</code>: applies a custom attribute for the current assembly. It only works when present in the Eiffel system root class <code>note</code> clause.
|
||||
|
||||
==Differences between Eiffel for .NET and .NET==
|
||||
|
||||
|
||||
Reference in New Issue
Block a user