MethodAspectAttribute

Overview

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. 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.

Location


 

constructor (String, Boolean)

Call this constructor to trigger this aspect for all static or non-static members on this type

 

constructor(aTargetType: String; aStatic: Boolean)

 

MethodAspectAttribute(String aTargetType, Boolean aStatic)

 

init(_ aTargetType: String, _ aStatic: Boolean)

 

MethodAspectAttribute(String aTargetType, Boolean aStatic)

 

Sub New(aTargetType As String, aStatic As Boolean)

Parameters:

  • aTargetType: type to run on
  • aStatic: if true all static else all instance members

constructor (String, Boolean, String, Int32, 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

 

constructor(aTargetType: String; aStatic: Boolean; aMemberName: String; aGenericParameters: Int32; params aArgTypes: array of String)

 

MethodAspectAttribute(String aTargetType, Boolean aStatic, String aMemberName, Int32 aGenericParameters, params String[] aArgTypes)

 

init(_ aTargetType: String, _ aStatic: Boolean, _ aMemberName: String, _ aGenericParameters: Int32, _ aArgTypes: String...)

 

MethodAspectAttribute(String aTargetType, Boolean aStatic, String aMemberName, Int32 aGenericParameters, String[]... aArgTypes)

 

Sub New(aTargetType As String, aStatic As Boolean, aMemberName As String, aGenericParameters As Int32, ParamArray aArgTypes As String())

Parameters:

  • aTargetType: Type to run this aspect on
  • aStatic: if true static else instance member
  • aMemberName: name of the member to run on. Or null for all
  • aGenericParameters: optional generic parameters for this member
  • aArgTypes: argument types for this member

constructor (Type, Boolean)

Call this constructor to trigger this aspect for all static or non-static members on this type

 

constructor(aTargetType: Type; aStatic: Boolean)

 

MethodAspectAttribute(Type aTargetType, Boolean aStatic)

 

init(_ aTargetType: Type, _ aStatic: Boolean)

 

MethodAspectAttribute(Type aTargetType, Boolean aStatic)

 

Sub New(aTargetType As Type, aStatic As Boolean)

Parameters:

  • aTargetType: type to run on
  • aStatic: if true all static else all instance members

constructor (Type, Boolean, String, Int32, 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: Type; aStatic: Boolean; aMemberName: String; aGenericParameters: Int32; params aArgTypes: array of Type)

 

MethodAspectAttribute(Type aTargetType, Boolean aStatic, String aMemberName, Int32 aGenericParameters, params Type[] aArgTypes)

 

init(_ aTargetType: Type, _ aStatic: Boolean, _ aMemberName: String, _ aGenericParameters: Int32, _ aArgTypes: Type...)

 

MethodAspectAttribute(Type aTargetType, Boolean aStatic, String aMemberName, Int32 aGenericParameters, Type[]... aArgTypes)

 

Sub New(aTargetType As Type, aStatic As Boolean, aMemberName As String, aGenericParameters As Int32, ParamArray aArgTypes As Type())

Parameters:

  • aTargetType: Type to run this aspect on
  • aStatic: if true static else instance member
  • aMemberName: name of the member to run on. Or null for all
  • aGenericParameters: optional generic parameters for this member
  • aArgTypes: argument types for this member

constructor (String)

Call this constructor to trigger this aspect for all members in this namespace

 

constructor(Namespace: String)

 

MethodAspectAttribute(String Namespace)

 

init(_ Namespace: String)

 

MethodAspectAttribute(String Namespace)

 

Sub New(Namespace As String)

Parameters:

  • Namespace: namespace for which members to run this aspect

ArgTypes

argument types for this member

 

property ArgTypes: array of String read;

 

String[] ArgTypes { get; }

 

var ArgTypes: String... { get{} }

 

String[] ArgTypes { __get; }

 

ReadOnly Property ArgTypes() As String()

GenericParameters

generic parameters for this member

 

property GenericParameters: Int32 read;

 

Int32 GenericParameters { get; }

 

var GenericParameters: Int32 { get{} }

 

Int32 GenericParameters { __get; }

 

ReadOnly Property GenericParameters() As Int32

MemberName

name of the member to run on. Or null for all

 

property MemberName: String read;

 

String MemberName { get; }

 

var MemberName: String { get{} }

 

String MemberName { __get; }

 

ReadOnly Property MemberName() As String

Namespace

namespace for which members to run this aspect

 

property Namespace: String read;

 

String Namespace { get; }

 

var Namespace: String { get{} }

 

String Namespace { __get; }

 

ReadOnly Property Namespace() As String

Static

if true a static else an instance member

 

property Static: Boolean read;

 

Boolean Static { get; }

 

var Static: Boolean { get{} }

 

Boolean Static { __get; }

 

ReadOnly Property Static() As Boolean

TargetType

Type to run this aspect on

 

property TargetType: String read;

 

String TargetType { get; }

 

var TargetType: String { get{} }

 

String TargetType { __get; }

 

ReadOnly Property TargetType() As String

WarnIfNotFound

If true, warn if this member doesn't exist

 

property WarnIfNotFound: Boolean read write;

 

Boolean WarnIfNotFound { get; set; }

 

var WarnIfNotFound: Boolean { get{} set{} }

 

Boolean WarnIfNotFound { __get; __set; }

 

Property WarnIfNotFound() As Boolean

 

ArgTypes

argument types for this member

 

property ArgTypes: array of String read;

 

String[] ArgTypes { get; }

 

var ArgTypes: String... { get{} }

 

String[] ArgTypes { __get; }

 

ReadOnly Property ArgTypes() As String()

GenericParameters

generic parameters for this member

 

property GenericParameters: Int32 read;

 

Int32 GenericParameters { get; }

 

var GenericParameters: Int32 { get{} }

 

Int32 GenericParameters { __get; }

 

ReadOnly Property GenericParameters() As Int32

MemberName

name of the member to run on. Or null for all

 

property MemberName: String read;

 

String MemberName { get; }

 

var MemberName: String { get{} }

 

String MemberName { __get; }

 

ReadOnly Property MemberName() As String

Namespace

namespace for which members to run this aspect

 

property Namespace: String read;

 

String Namespace { get; }

 

var Namespace: String { get{} }

 

String Namespace { __get; }

 

ReadOnly Property Namespace() As String

Static

if true a static else an instance member

 

property Static: Boolean read;

 

Boolean Static { get; }

 

var Static: Boolean { get{} }

 

Boolean Static { __get; }

 

ReadOnly Property Static() As Boolean

TargetType

Type to run this aspect on

 

property TargetType: String read;

 

String TargetType { get; }

 

var TargetType: String { get{} }

 

String TargetType { __get; }

 

ReadOnly Property TargetType() As String

WarnIfNotFound

If true, warn if this member doesn't exist

 

property WarnIfNotFound: Boolean read write;

 

Boolean WarnIfNotFound { get; set; }

 

var WarnIfNotFound: Boolean { get{} set{} }

 

Boolean WarnIfNotFound { __get; __set; }

 

Property WarnIfNotFound() As Boolean

 

constructor (String, Boolean)

Call this constructor to trigger this aspect for all static or non-static members on this type

 

constructor(aTargetType: String; aStatic: Boolean)

 

MethodAspectAttribute(String aTargetType, Boolean aStatic)

 

init(_ aTargetType: String, _ aStatic: Boolean)

 

MethodAspectAttribute(String aTargetType, Boolean aStatic)

 

Sub New(aTargetType As String, aStatic As Boolean)

Parameters:

  • aTargetType: type to run on
  • aStatic: if true all static else all instance members

constructor (String, Boolean, String, Int32, 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

 

constructor(aTargetType: String; aStatic: Boolean; aMemberName: String; aGenericParameters: Int32; params aArgTypes: array of String)

 

MethodAspectAttribute(String aTargetType, Boolean aStatic, String aMemberName, Int32 aGenericParameters, params String[] aArgTypes)

 

init(_ aTargetType: String, _ aStatic: Boolean, _ aMemberName: String, _ aGenericParameters: Int32, _ aArgTypes: String...)

 

MethodAspectAttribute(String aTargetType, Boolean aStatic, String aMemberName, Int32 aGenericParameters, String[]... aArgTypes)

 

Sub New(aTargetType As String, aStatic As Boolean, aMemberName As String, aGenericParameters As Int32, ParamArray aArgTypes As String())

Parameters:

  • aTargetType: Type to run this aspect on
  • aStatic: if true static else instance member
  • aMemberName: name of the member to run on. Or null for all
  • aGenericParameters: optional generic parameters for this member
  • aArgTypes: argument types for this member

constructor (Type, Boolean)

Call this constructor to trigger this aspect for all static or non-static members on this type

 

constructor(aTargetType: Type; aStatic: Boolean)

 

MethodAspectAttribute(Type aTargetType, Boolean aStatic)

 

init(_ aTargetType: Type, _ aStatic: Boolean)

 

MethodAspectAttribute(Type aTargetType, Boolean aStatic)

 

Sub New(aTargetType As Type, aStatic As Boolean)

Parameters:

  • aTargetType: type to run on
  • aStatic: if true all static else all instance members

constructor (Type, Boolean, String, Int32, 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: Type; aStatic: Boolean; aMemberName: String; aGenericParameters: Int32; params aArgTypes: array of Type)

 

MethodAspectAttribute(Type aTargetType, Boolean aStatic, String aMemberName, Int32 aGenericParameters, params Type[] aArgTypes)

 

init(_ aTargetType: Type, _ aStatic: Boolean, _ aMemberName: String, _ aGenericParameters: Int32, _ aArgTypes: Type...)

 

MethodAspectAttribute(Type aTargetType, Boolean aStatic, String aMemberName, Int32 aGenericParameters, Type[]... aArgTypes)

 

Sub New(aTargetType As Type, aStatic As Boolean, aMemberName As String, aGenericParameters As Int32, ParamArray aArgTypes As Type())

Parameters:

  • aTargetType: Type to run this aspect on
  • aStatic: if true static else instance member
  • aMemberName: name of the member to run on. Or null for all
  • aGenericParameters: optional generic parameters for this member
  • aArgTypes: argument types for this member

constructor (String)

Call this constructor to trigger this aspect for all members in this namespace

 

constructor(Namespace: String)

 

MethodAspectAttribute(String Namespace)

 

init(_ Namespace: String)

 

MethodAspectAttribute(String Namespace)

 

Sub New(Namespace As String)

Parameters:

  • Namespace: namespace for which members to run this aspect