BaseFilteredAspect

Overview

Base class for filtered aspects; Uses regular expressions to Include or Exclude; When both are set, this excludes the members selected by the Includes. The string that the compiler uses for comparison depends on the element type:

  • Types: a type is always prefixed with 'Type:' string, then the full type name. For example: 'Type:System.String'
  • Fields: a field is always prefixed with 'Field:', then the full type name, then two dots, and the fieldname, for example: 'Field:MyNamespace.MyClass..FieldName'
  • Constants: a constant is always prefixed with 'Constant:', then the full type name, then two dots, and the name of the constant, for example: 'Constant:MyNamespace.MyClass..ConstantName'
  • Events: an event is always prefixed with 'Event:', then the full type name, then two dots, and the name of the event, for example: 'Event:MyNamespace.MyClass..EventName'
  • Methods: a method is always prefixed with 'Method:', then the full type name, then two dots, and the name of the method, if there are parameters, it's followed by '(' then for each parameter (separated by a comma) the mode (nothing, 'var' or 'out') and the full type name; followed by ')', for example: 'Method:System.Int32.TryParse(System.String,out System.Int32)'
  • Property: a property is always prefixed with 'Property:', then the full type name, then two dots, and the name of the property, if there are parameters, it's followed by '[' then for each parameter (separated by a comma) the mode (nothing, 'var' or 'out') and the full type name; followed by ']', for example: 'Property:System.Collections.ArrayList.Item[System.Int32]'

Note: When using filters, make sure the filter validates on the Type too, when using the AutoInjectAspectAttribute, else the attribute will be skipped.

Location


Properties


Exclude

Array of members to exclude; This list is checked after the Include list (if any), all members are checked if they match all conditions in this list.

 

property Exclude: array of String read write;

 

String[] Exclude { get; set; }

 

var Exclude: String... { get{} set{} }

 

String[] Exclude { __get; __set; }

 

Property Exclude() As String()

Include

Array of members to include; This list is checked first; if it has more than 0 members it will only process items that match any of the regex strings in the array.

 

property Include: array of String read write;

 

String[] Include { get; set; }

 

var Include: String... { get{} set{} }

 

String[] Include { __get; __set; }

 

Property Include() As String()

Instance Methods


constructor

constructor

 

constructor

 

BaseFilteredAspect()

 

init()

 

BaseFilteredAspect()

 

Sub New()

LoadRegex

(re)Load the internal regular expression objects

 

method LoadRegex

 

void LoadRegex()

 

func LoadRegex()

 

void LoadRegex()

 

Sub LoadRegex()

ShouldProcessMember

Regular expression filter method

 

method ShouldProcessMember(aMember: IElementDefinition): Boolean

 

Boolean ShouldProcessMember(IElementDefinition aMember)

 

func ShouldProcessMember(_ aMember: IElementDefinition) -> Boolean

 

Boolean ShouldProcessMember(IElementDefinition aMember)

 

Function ShouldProcessMember(aMember As IElementDefinition) As Boolean

Parameters:

  • aMember: member to check