BaseFilteredAspect Class
From The Oxygene Language Wiki
This is a Language topic
Feel free to add your notes to this topic below.
BaseFilteredAspect = public class(Attribute, IAspectFilter, IBaseAspect)
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.
Namespace: Cirrus
Members
| | |
|---|---|
| constructor | constructor |
| LoadRegex | (re)Load the internal regular expression objects |
| ShouldProcessMember(aMember: IElementDefinition): Boolean | Regular expression filter method |
Properties
| | |
|---|---|
| Exclude: array of String | 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. |
| Include: array of String | 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. |
See Also
- Cirrus
- External Links:
- Prism Aspects to Help with Monobjc Development (RemObjects Blogs)
- IBaseAspect Interface
- IAspectFilter Interface
Area: Oxygene Language
Compiler version: Oxygene 5
Language Glossary — Keywords — Types — FAQ — How To