Custom attribute that can be applied to any member of an aspect class and that means that this member must be introduced to the target class of the aspect.
Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[AttributeUsage(AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Event)]
public sealed class IntroduceAttribute : DeclarativeAdviceAttribute, ITemplateAttribute, IAdviceAttribute
Constructors
Name | Description |
---|---|
IntroduceAttribute() |
Properties
Name | Description |
---|---|
Accessibility | |
IsRequired | |
IsSealed | |
IsVirtual | |
Name | |
Scope | |
WhenExists | Gets or sets the implementation strategy (like Override, Fail or Ignore) when the member is already declared in the target type. The default value is Fail. |
WhenInherited | Gets or sets the implementation strategy (like Override, Fail or Ignore) when the member is already declared in a parent class of the target type. The default value is Fail. |
Methods
Name | Description |
---|---|
BuildAdvice(IMemberOrNamedType, string, IAspectBuilder<IDeclaration>) | Builds the aspect, i.e. translates the current declarative advice into a programmatic advice or possibly diagnostics and validators. In case of error, the implementation must report diagnostics and call SkipAspect(). |
BuildAspectEligibility(IEligibilityBuilder<IDeclaration>, IMemberOrNamedType) | Builds the eligibility of an aspect that contains the current declarative advice. |