Open sandboxFocus

Interface IAspectReceiver<TDeclaration, TTag>

Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public interface IAspectReceiver<out TDeclaration, out TTag> : IValidatorReceiver<TDeclaration, TTag>, IAspectReceiver<TDeclaration>, IValidatorReceiver<TDeclaration>, IValidatorReceiver where TDeclaration : class, IDeclaration
Type Parameters
Name Description
TDeclaration
TTag

Methods

Name Description
AddAspect(Type, Func<TDeclaration, TTag, IAspect>)

Adds a aspect to the current set of declarations or throws an exception if the aspect is not eligible for the aspect. This overload is non-generic.

AddAspectIfEligible(Type, Func<TDeclaration, TTag, IAspect>, EligibleScenarios)

Adds an aspect to the current set of declarations but only if the aspect is eligible for the declaration. This overload is non-generic.

AddAspectIfEligible<TAspect>(Func<TDeclaration, TTag, TAspect>, EligibleScenarios)

Adds an aspect to the current set of declarations but only if the aspect is eligible for the declaration.

AddAspect<TAspect>(Func<TDeclaration, TTag, TAspect>)

Adds an aspect to the current set of declarations or throws an exception if the aspect is not eligible for the aspect.

OfType<TOut>()
SelectMany<TMember>(Func<TDeclaration, IEnumerable<TMember>>)

Projects each declaration of the current set to an IEnumerable<T> (typically a list of child declarations) and flattens the resulting sequences into one set.

SelectMany<TMember>(Func<TDeclaration, TTag, IEnumerable<TMember>>)

Projects each declaration of the current set to an IEnumerable<T> (typically a list of child declarations) and flattens the resulting sequences into one set. This overload does supplies the tag to the selector delegate.

SelectTypes(bool)

Selects all types enclosed in declarations of the current set.

SelectTypesDerivedFrom(INamedType, DerivedTypesOptions)

Selects all types, among those enclosed in declarations of the current set, that derive from or implement a given Type.

SelectTypesDerivedFrom(Type, DerivedTypesOptions)

Selects all types, among those enclosed in declarations of the current set, that derive from or implement a given Type.

Select<TMember>(Func<TDeclaration, TTag, TMember>)

Projects each declaration of the current set into a new declaration. This overload does supplies the tag to the selector delegate.

Select<TMember>(Func<TDeclaration, TMember>)

Projects each declaration of the current set into a new declaration.

SetOptions<TOptions>(Func<TDeclaration, TTag, TOptions>)

Sets options for the declarations in the current set of declarations by supplying a Func<TResult>.

Tag<TNewTag>(Func<TDeclaration, TTag, TNewTag>)

Projects the declarations in the current set by replacing the tag of each declaration. This overload does supplies the old tag to the getTag delegate.

Tag<TNewTag>(Func<TDeclaration, TNewTag>)

Projects the declarations in the current set by replacing the tag of each declaration.

Where(Func<TDeclaration, bool>)

Filters the set of declarations based on a predicate.

Where(Func<TDeclaration, TTag, bool>)

Filters the set of declarations based on a predicate. This overload does supplies the tag to the predicate delegate.

Extension Methods