Method OverrideAccessors
OverrideAccessors(IFieldOrPropertyOrIndexer, in GetterTemplateSelector, String, Object, Object)
Overrides a field or property by specifying a method template for the getter, the setter, or both.
Declaration
IOverrideAdviceResult<IProperty> OverrideAccessors(IFieldOrPropertyOrIndexer targetFieldOrPropertyOrIndexer, in GetterTemplateSelector getTemplate = null, string setTemplate = null, object args = null, object tags = null)
Parameters
Type | Name | Description |
---|---|---|
IFieldOrPropertyOrIndexer | targetFieldOrPropertyOrIndexer | The field or property to override. |
GetterTemplateSelector | getTemplate | The name of the method of the aspect class whose implementation will be used as a template for the getter, or |
String | setTemplate | The name of the method of the aspect class whose implementation will be used as a template for the getter, or |
Object | args | An object (typically of anonymous type) whose properties map to parameters or type parameters of the template methods. |
Object | tags | An optional opaque object of anonymous type passed to the template method and exposed under the Tags property of the meta API. |
Returns
Type | Description |
---|---|
IOverrideAdviceResult<IProperty> |
See Also
OverrideAccessors(IEvent, String, String, String, Object, Object)
Overrides an event by specifying a template for the adder, the remover, and/or the raiser.
Declaration
IOverrideAdviceResult<IEvent> OverrideAccessors(IEvent targetEvent, string addTemplate, string removeTemplate, string raiseTemplate = null, object args = null, object tags = null)
Parameters
Type | Name | Description |
---|---|---|
IEvent | targetEvent | The event to be overridden. |
String | addTemplate | The name of the method of the aspect class whose type and implementation will be used as a template for the adder, or |
String | removeTemplate | The name of the method of the aspect class whose type and implementation will be used as a template for the remover, or |
String | raiseTemplate | Not yet implemented. |
Object | args | An object (typically of anonymous type) whose properties map to parameters or type parameters of the template methods. |
Object | tags | An optional opaque object of anonymous type passed to the template method and exposed under the Tags property of the meta API. |
Returns
Type | Description |
---|---|
IOverrideAdviceResult<IEvent> |