MetalamaAPI documentationAspect APIMetalama.​Framework.​AspectsDeclarative­Advice­Attribute
Open sandboxFocus

DeclarativeAdviceAttribute Class

A base class for attributes that define declarative advice members.

Inheritance
System.Object
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.