Open sandboxFocus

Class CustomAttributeIntroductionAspect

There is no specific aspect class to add a custom attribute in Metalama, but only the advice factory method IntroduceAttribute(IDeclaration, IAttributeData, OverrideStrategy). Create an aspect class that calls this advice factory method from BuildAspect(IAspectBuilder<T>).

Inheritance
CustomAttributeIntroductionAspect
Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[LinesOfCodeAvoided(1)]
[Obsolete("There is no specific aspect class to add a custom attribute in Metalama, but only the advice factory method 'IAdviceFactory.IntroduceAttribute(IDeclaration, IAttributeData, OverrideStrategy)'. Create an aspect class that calls this advice factory method from 'IAspect<T>.BuildAspect(IAspectBuilder<T>)'.", false)]
public sealed class CustomAttributeIntroductionAspect : ICustomAttributeIntroductionAspect, IAspect, IAspectBuildSemantics, IValidableAnnotation

Constructors

Name Description
CustomAttributeIntroductionAspect(ObjectConstruction)
CustomAttributeIntroductionAspect(CustomAttributeData)

Properties

Name Description
CustomAttribute