Open sandboxFocus

Class MulticastImplementation

A reusable implementation of the multicasting logic. Multicast-enabled aspects can contain an instance of this class and call its BuildAspect<T>(IAspectBuilder<T>, Action<IAspectBuilder<T>>?) method to perform multicasting.

Inheritance
MulticastImplementation
Namespace: Metalama.Extensions.Multicast
Assembly: Metalama.Extensions.Multicast.dll
Syntax
[CompileTime]
public sealed class MulticastImplementation
Remarks

This class provides the core multicasting functionality that enables aspects to be applied at the assembly or type level and automatically cascade to matching members based on filtering criteria defined through IMulticastAttribute properties.

When using this class directly (rather than deriving from MulticastAspect), your aspect must:

The multicasting process cascades from parent declarations to children: from assemblies to types, and from types to members. At each level, the BuildAspect<T>(IAspectBuilder<T>, Action<IAspectBuilder<T>>?) method should be called to propagate the aspect to matching child declarations.

Constructors

Name Description
MulticastImplementation(MulticastTargets, bool)

Initializes a new instance of the MulticastImplementation class.

Properties

Name Description
ConcreteTargets

Gets the kind of declarations to which the aspect can be applied. This property is set from the class constructor.

Methods

Name Description
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.

Extension Methods

See Also