This is the online documentation for PostSharp 5.0.
Download PDF or CHM. Go to v4.3 or v5.0

AspectInstance Class

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).
Inheritance Hierarchy
System.Object
  PostSharp.Aspects.AspectSpecification
    PostSharp.Aspects.AspectInstance

Namespace:  PostSharp.Aspects
Assembly:  PostSharp (in PostSharp.dll) Version: 5.0.34.0 (5.0.34.0)
Syntax
C#
public sealed class AspectInstance : AspectSpecification

The AspectInstance type exposes the following members.

Constructors
  NameDescription
Public methodAspectInstance(Object, IAspect)
Initializes a new AspectInstance from a runtime aspect instance (IAspect).
Public methodAspectInstance(Object, ObjectConstruction)
Initializes a new AspectInstance from an ObjectConstruction.
Public methodAspectInstance(Object, IAspect, AspectConfiguration)
Initializes a new AspectInstance from a runtime aspect instance (IAspect) and its AspectConfiguration.
Public methodAspectInstance(Object, ObjectConstruction, AspectConfiguration)
Initializes a new AspectInstance from an ObjectConstruction and specifies an AspectConfiguration object.
Top
Properties
  NameDescription
Public propertyAspect
Gets the aspect instance.
(Inherited from AspectSpecification.)
Public propertyAspectAssemblyQualifiedTypeName
Gets the assembly-qualified type name of the aspect.
(Inherited from AspectSpecification.)
Public propertyAspectConfiguration
Gets the aspect configuration.
(Inherited from AspectSpecification.)
Public propertyAspectConstruction
Gets the aspect construction.
(Inherited from AspectSpecification.)
Public propertyAspectTypeName
Gets the type name of the aspect.
(Inherited from AspectSpecification.)
Public propertyRepresentAsStandalone
Determines whether the AspectInstance should be represented as a stand-alone instance in PostSharp Tools for Visual Studio. If false, the current AspectInstance will be not be represented as a standalone node, and its advices will be merged with the ones provided by the parent aspect (implementing IAspectProvider). The default value is false.
Public propertyTargetElement
Gets the code element (Assembly, Type, FieldInfo, MethodBase, PropertyInfo, EventInfo, ParameterInfo, or LocationInfo) to which the current AspectInstance is applied.
Top
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
Top
See Also