Completely specifies an aspect instance, including its target code element. An AspectInstance contains either the aspect instance itself (Aspect property), either information allowing to construct the aspect (AspectConstruction) and configure the weaver (AspectConfiguration).
Namespace: PostSharp.Aspects
Assembly: PostSharp.dll
Syntax
public sealed class AspectInstance : AspectSpecificationConstructors
| Name | Description |
|---|---|
| AspectInstance(object, IAspect) | Initializes a new AspectInstance from a runtime aspect instance (IAspect). |
| AspectInstance(object, IAspect, AspectConfiguration) | Initializes a new AspectInstance from a runtime aspect instance (IAspect) and its AspectConfiguration. |
| AspectInstance(object, ObjectConstruction) | Initializes a new AspectInstance from an ObjectConstruction. |
| AspectInstance(object, ObjectConstruction, AspectConfiguration) | Initializes a new AspectInstance from an ObjectConstruction and specifies an AspectConfiguration object. |
Properties
| Name | Description |
|---|---|
| RepresentAsStandalone | Determines whether the AspectInstance should be represented as a stand-alone instance
in PostSharp Tools for Visual Studio. If |
| TargetElement | Gets the code element (Assembly, Type, FieldInfo, MethodBase, PropertyInfo, EventInfo, ParameterInfo, or LocationInfo) to which the current AspectInstance is applied. |