AddAspect<TDeclaration>(IAdviser<TDeclaration>, IAspect<TDeclaration>)
Adds an aspect to the target declaration. Use the With<TNewDeclaration>(TNewDeclaration) method to add the aspect to a different declaration than the current one.
Declaration
public static void AddAspect<TDeclaration>(this IAdviser<TDeclaration> adviser, IAspect<TDeclaration> aspect) where TDeclaration : class, IDeclarationParameters
| Type | Name | Description |
|---|---|---|
| IAdviser<TDeclaration> | adviser | An adviser for a declaration. |
| IAspect<TDeclaration> | aspect | The aspect to add to the target declaration. |
Type Parameters
| Name | Description |
|---|---|
| TDeclaration | The type of declaration that the aspect targets. |
AddAspect<TAspect>(IAdviser)
Adds an aspect to the target declaration, using the aspect type's default constructor. Use the With<TNewDeclaration>(TNewDeclaration) method to add the aspect to a different declaration than the current one.
Declaration
public static void AddAspect<TAspect>(this IAdviser adviser) where TAspect : class, IAspect, new()Parameters
| Type | Name | Description |
|---|---|---|
| IAdviser | adviser | An adviser for a declaration. |
Type Parameters
| Name | Description |
|---|---|
| TAspect | The aspect type. It must have a default constructor. |