BuildAspect<T>(IAspectBuilder<T>, Action<IAspectBuilder<T>>?)
Implements the multicasting logic for a given declaration level. This method must be called from the BuildAspect(IAspectBuilder<T>) method of the aspect class.
Declaration
public void BuildAspect<T>(IAspectBuilder<T> builder, Action<IAspectBuilder<T>>? implementConcreteAspect = null) where T : class, IDeclarationParameters
| Type | Name | Description |
|---|---|---|
| IAspectBuilder<T> | builder | The IAspectBuilder<TAspectTarget> provided to the aspect's |
| Action<IAspectBuilder<T>> | implementConcreteAspect | An optional action that implements the aspect's actual behavior. This delegate is called
only when the current target is a final (concrete) target as specified by ConcreteTargets and matches the
filtering criteria. For intermediate targets (assemblies, types), pass |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the target declaration. |
Remarks
This method performs two key operations:
- If the current target is a concrete target (as defined by ConcreteTargets) and matches
the filtering criteria defined by IMulticastAttribute properties, it invokes the
implementConcreteAspectdelegate to apply the aspect's actual transformation. - It propagates the aspect to matching child declarations based on the filtering criteria, enabling the cascading multicast behavior from assemblies to types to members.
If the AttributeExclude property is true on the current aspect instance,
no transformation is applied and the aspect is skipped.