MethodAspectAttribute Class

From The Oxygene Language Wiki

Jump to:navigation, search

This is a Language topic
Feel free to add your notes to this topic below.


The MethodAspectAttribute class is the attribute to be applied to any method call aspect. This attribute should be applied to the class that has the method call aspect, and the class should implement the IMethodCallDecorator Interface. The attribute has several overloads for the constructor, one for all members on a namespace, one for all members on a type and one for a specific method.

MethodAspectAttribute = public class(Attribute)


Namespace: Cirrus


Members

Method
Description
constructor(&Namespace: string) Call this constructor to trigger this aspect for all members in this namespace
constructor(aTargetType: &Type; aStatic: Boolean) Call this constructor to trigger this aspect for all static or non-static members on this type
constructor(aTargetType: string; aStatic: Boolean) Call this constructor to trigger this aspect for all static or non-static members on this type
constructor(aTargetType: &Type; aStatic: Boolean; aMemberName: string; aGenericParameter: Integer := 0; params aTypes: array of &Type) Call this constructor to trigger this aspect for a single member; the aGenericParameter contains the number of generic parameters, aTypes contains the type names, aMemberName the name of the method
constructor(aTargetType: string; aStatic: Boolean; aMemberName: string; aGenericParameter: Integer := 0; params aTypes: array of String) Call this constructor to trigger this aspect for a single member; the aGenericParameter contains the number of generic parameters, aTypes contains the type names, aMemberName the name of the method


Properties

Property
Description
Namespace: String If set, this aspect is triggered for all methods in that namespace and none of the others will be set
GenericParameters: Integer When doing method specific call aspects, this defines the number of generic parameters
TargetType: string The target type to bind this aspect to
Static: Boolean Bind to a static method
MemberName: string The member name to bind to
ArgTypes: array of string The parameter types to bind to
WarnIfNotFound: Boolean If true, it will warn if the method is not set


See Also


Oxygene-48.png

Area: Oxygene Language
Compiler version: Oxygene 5

Language GlossaryKeywordsTypesFAQHow To

Navigation
Areas
More
Toolbox