AddAspect(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
void AddAspect(Type aspectType, Func<out TDeclaration, IAspect> createAspect)
Parameters
Type | Name | Description |
---|---|---|
Type | aspectType | The exact type of the aspect returned by |
Func<TDeclaration, IAspect> | createAspect | A function that returns the aspect for a given declaration. |
AddAspect<TAspect>(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
void AddAspect<TAspect>(Func<out TDeclaration, TAspect> createAspect) where TAspect : class, IAspect<out TDeclaration>
Parameters
Type | Name | Description |
---|---|---|
Func<TDeclaration, TAspect> | createAspect | A function that returns the aspect for a given declaration. |
Type Parameters
Name | Description |
---|---|
TAspect |
AddAspect<TAspect>()
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
void AddAspect<TAspect>() where TAspect : class, IAspect<out TDeclaration>, new()
Type Parameters
Name | Description |
---|---|
TAspect |