Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Aspects / Declarative­Advice­Attribute

Class DeclarativeAdviceAttribute

A base class for attributes that define declarative advice members.

Inheritance
DeclarativeAdviceAttribute
Implements
IAdviceAttribute
Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public abstract class DeclarativeAdviceAttribute : Attribute, IAdviceAttribute

Constructors

Name Description
DeclarativeAdviceAttribute()

Properties

Name Description
Layer

Gets or sets the name of the aspect layer into which the member will be introduced. The layer must have been defined using the LayersAttribute custom attribute.

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.

Extension Methods

PresentingExtensions.AsHyperlink(Object)