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

Method BuildAdvice

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().

Declaration
public abstract void BuildAdvice(IMemberOrNamedType templateMember, string templateMemberId, IAspectBuilder<IDeclaration> builder)
Parameters
Type Name Description
IMemberOrNamedType templateMember

The member or type to which the current attribute is applied.

String templateMemberId

The a value that represents templateMember and that must be supplied to IAdviceFactory. It is not actually the name, but a unique identifier of templateMember.

IAspectBuilder<IDeclaration> builder

An IAspectBuilder<TAspectTarget>.