AddAspect<TDeclaration>(IQuery<TDeclaration>, Type, Func<TDeclaration, 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.
Declaration
public static void AddAspect<TDeclaration>(this IQuery<TDeclaration> query, Type aspectType, Func<TDeclaration, IAspect> createAspect) where TDeclaration : class, IDeclarationParameters
| Type | Name | Description |
|---|---|---|
| IQuery<TDeclaration> | query | A query selecting the declarations to validate. |
| Type | aspectType | The exact type of the aspect returned by |
| Func<TDeclaration, IAspect> | createAspect | A function that returns the aspect for a given declaration. |
Type Parameters
| Name | Description |
|---|---|
| TDeclaration | The type of declaration in the query. |
AddAspect<TDeclaration, TAspect>(IQuery<TDeclaration>, Func<TDeclaration, TAspect>)
Adds an aspect to the current set of declarations or throws an exception if the aspect is not eligible for the aspect.
Declaration
public static void AddAspect<TDeclaration, TAspect>(this IQuery<TDeclaration> query, Func<TDeclaration, TAspect> createAspect) where TDeclaration : class, IDeclaration where TAspect : class, IAspect<TDeclaration>Parameters
| Type | Name | Description |
|---|---|---|
| IQuery<TDeclaration> | query | A query selecting the declarations to validate. |
| Func<TDeclaration, TAspect> | createAspect | A function that returns the aspect for a given declaration. |
Type Parameters
| Name | Description |
|---|---|
| TDeclaration | The type of declaration in the query. |
| TAspect | The type of aspect to add. |
AddAspect<TAspect>(IQuery<IDeclaration>)
Adds an aspect to the current set of declarations or throws an exception if the aspect is not eligible for the aspect. This overload creates a new instance of the aspect class for each target declaration.
Declaration
public static void AddAspect<TAspect>(this IQuery<IDeclaration> query) where TAspect : class, IAspect, new()Parameters
| Type | Name | Description |
|---|---|---|
| IQuery<IDeclaration> | query | A query selecting the declarations to which the aspect should be added. |
Type Parameters
| Name | Description |
|---|---|
| TAspect | The type of aspect to add. |
AddAspect<TDeclaration, TTag>(ITaggedQuery<TDeclaration, TTag>, 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.
Declaration
public static void AddAspect<TDeclaration, TTag>(this ITaggedQuery<TDeclaration, TTag> query, Type aspectType, Func<TDeclaration, TTag, IAspect> createAspect) where TDeclaration : class, IDeclarationParameters
| Type | Name | Description |
|---|---|---|
| ITaggedQuery<TDeclaration, TTag> | query | A query selecting the declarations to validate. |
| Type | aspectType | The exact type of the aspect returned by |
| Func<TDeclaration, TTag, IAspect> | createAspect | A function that returns the aspect for a given declaration. |
Type Parameters
| Name | Description |
|---|---|
| TDeclaration | The type of declaration in the query. |
| TTag | The type of tag associated with each declaration. |
AddAspect<TDeclaration, TTag, TAspect>(ITaggedQuery<TDeclaration, TTag>, 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.
Declaration
public static void AddAspect<TDeclaration, TTag, TAspect>(this ITaggedQuery<TDeclaration, TTag> query, Func<TDeclaration, TTag, TAspect> createAspect) where TDeclaration : class, IDeclaration where TAspect : class, IAspect<TDeclaration>Parameters
| Type | Name | Description |
|---|---|---|
| ITaggedQuery<TDeclaration, TTag> | query | A query selecting the declarations to validate. |
| Func<TDeclaration, TTag, TAspect> | createAspect | A function that returns the aspect for a given declaration. |
Type Parameters
| Name | Description |
|---|---|
| TDeclaration | The type of declaration in the query. |
| TTag | The type of tag associated with each declaration. |
| TAspect | The type of aspect to add. |