Open sandboxFocus

Interface IAspectBuilder<TAspectTarget>

An object used by the BuildAspect(IAspectBuilder<T>) method of the aspect to provide advice, child aspects and validators, or report diagnostics. This is a strongly-typed variant of the IAspectBuilder interface.

Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
public interface IAspectBuilder<out TAspectTarget> : IAspectBuilder, IAdviser<TAspectTarget>, IAdviser where TAspectTarget : class, IDeclaration
Type Parameters
Name Description
TAspectTarget

Properties

Name Description
AdvisedTarget

Gets the Target declaration in the current state, including all modifications performed by the current aspect.

Outbound

Gets an object that provides fabric-like capabilities for adding child aspects, validators, and diagnostics to code transformed by later aspects. This allows aspects to work with the final transformed code, not just the immediate target.

Target

Gets the declaration to which the aspect was added in the state it was before the aspect was applied.

Methods

Name Description
VerifyEligibility(IEligibilityRule<TAspectTarget>)

Verifies that the target of the aspect matches an eligibility rule. If not, reports an eligibility error (unless the aspect can be used by inheritance) and skips the aspect.

WithTarget<T>(T)
With<T>(T)

Extension Methods

See Also