OverrideProperty
The default template property for overriding field or property accessors.
Declaration
[Template]
public abstract dynamic? OverrideProperty { get; set; }Property Value
| Type | Description |
|---|---|
| dynamic |
Remarks
This is the primary template property that must be implemented in derived aspects. It is used for all fields and properties where a more specific template (OverrideEnumerableProperty or OverrideEnumeratorProperty) does not apply or has not been overridden.
Within the template, use meta.Target.FieldOrProperty.Value to access the underlying field or property value,
and meta.Target.FieldOrProperty to access metadata about the target.
Due to C# language rules, the template property must implement both getter and setter if both are needed. For fine-grained control over individual accessors, derive from FieldOrPropertyAspect and use Override(IAdviser<IFieldOrProperty>, string, object?) or OverrideAccessors(IAdviser<IFieldOrProperty>, in GetterTemplateSelector, string?, object?, object?) to override specific accessors.