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

DeclarativeAdviceAttribute.BuildAdvice Method

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.

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