An aspect equivalent to OverrideFieldOrPropertyAspect that also implements multicasting for backward compatibility with PostSharp.
Implements
Namespace: Metalama.Extensions.Multicast
Assembly: Metalama.Extensions.Multicast.dll
Syntax
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = true)]
public abstract class OverrideFieldOrPropertyMulticastAspect : MulticastAspect, IMulticastAttribute, IAspect<ICompilation>, IEligible<ICompilation>, IAspect<INamedType>, IEligible<INamedType>, IAspect<IFieldOrProperty>, IAspect, ICompileTimeSerializable, ITemplateProvider, IEligible<IFieldOrProperty>Remarks
This class combines the field/property overriding capabilities of OverrideFieldOrPropertyAspect with the multicasting features provided by MulticastAspect. It can be applied to fields, properties, types, or assemblies, and will automatically apply to matching fields and properties based on the multicasting filter properties inherited from IMulticastAttribute.
For details on the template system and best practices, see the documentation of OverrideFieldOrPropertyAspect.
Constructors
| Name | Description |
|---|---|
| OverrideFieldOrPropertyMulticastAspect() | Initializes a new instance of the OverrideFieldOrPropertyMulticastAspect class. |
Properties
| Name | Description |
|---|---|
| OverrideEnumerableProperty | Template property for overriding properties returning IEnumerable<T>. See OverrideEnumerableProperty for details. |
| OverrideEnumeratorProperty | Template property for overriding properties returning IEnumerator<T>. See OverrideEnumeratorProperty for details. |
| OverrideProperty | The default template property for overriding field or property accessors. See OverrideProperty for details. |
Methods
| Name | Description |
|---|---|
| BuildAspect(IAspectBuilder<IFieldOrProperty>) | Defines the aspect implementation by adding advice, child aspects, and validators to the target declaration. |
| BuildEligibility(IEligibilityBuilder<IFieldOrProperty>) | Configures the eligibility of the aspect or attribute by defining rules that determine which declarations the aspect can be applied to. |