Open sandboxFocus

Class OverrideMethodMulticastAspect

An aspect equivalent to OverrideMethodAspect that also implements multicasting for backward compatibility with PostSharp.

Inheritance
OverrideMethodMulticastAspect
Namespace: Metalama.Extensions.Multicast
Assembly: Metalama.Extensions.Multicast.dll
Syntax
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Event, AllowMultiple = true)]
public abstract class OverrideMethodMulticastAspect : MulticastAspect, IMulticastAttribute, IAspect<ICompilation>, IEligible<ICompilation>, IAspect<INamedType>, IEligible<INamedType>, IAspect<IProperty>, IEligible<IProperty>, IAspect<IEvent>, IEligible<IEvent>, IAspect<IMethod>, IAspect, ICompileTimeSerializable, ITemplateProvider, IEligible<IMethod>

Constructors

Name Description
OverrideMethodMulticastAspect()

Initializes a new instance of the OverrideMethodMulticastAspect class.

Properties

Name Description
UseAsyncTemplateForAnyAwaitable

Gets a value indicating whether the OverrideEnumerableMethod(), OverrideEnumeratorMethod(), OverrideAsyncEnumerableMethod" or OverrideAsyncEnumeratorMethod" template must be applied to all methods returning a compatible return type, instead of only to methods using the yield statement.

UseEnumerableTemplateForAnyEnumerable

Gets a value indicating whether the OverrideAsyncMethod() template must be applied to all methods returning an awaitable type (including IAsyncEnumerable and IAsyncEnumerator), instead of only to methods that have the async modifier.

Methods

Name Description
BuildAspect(IAspectBuilder<IEvent>)

Initializes the aspect. The implementation must add advice, child aspects and validators using the builder parameter.

BuildAspect(IAspectBuilder<IMethod>)

Initializes the aspect. The implementation must add advice, child aspects and validators using the builder parameter.

BuildAspect(IAspectBuilder<IProperty>)

Initializes the aspect. The implementation must add advice, child aspects and validators using the builder parameter.

BuildEligibility(IEligibilityBuilder<IEvent>)

Configures the eligibility of the aspect or attribute. Implementations are not allowed to reference non-static members. Implementations must call the implementation of the base class if it exists.

BuildEligibility(IEligibilityBuilder<IMethod>)

Configures the eligibility of the aspect or attribute. Implementations are not allowed to reference non-static members. Implementations must call the implementation of the base class if it exists.

BuildEligibility(IEligibilityBuilder<IProperty>)

Configures the eligibility of the aspect or attribute. Implementations are not allowed to reference non-static members. Implementations must call the implementation of the base class if it exists.

OverrideAsyncEnumerableMethod()
OverrideAsyncEnumeratorMethod()
OverrideAsyncMethod()
OverrideEnumerableMethod()
OverrideEnumeratorMethod()
OverrideMethod()

Default template of the new method implementation.