Post­Sharp Documentation / API Reference / Post­Sharp.​Aspects Namespace / Aspect­Instance Class / Aspect­Instance Constructor / Aspect­Instance Constructor (Object, Object­Construction)

AspectInstance Constructor (Object, ObjectConstruction)

Initializes a new AspectInstance from an ObjectConstruction.

Namespace:  PostSharp.Aspects
Assembly:  PostSharp (in PostSharp.dll) Version: 5.0.38.0 (5.0.38.0)
Syntax
C#
public AspectInstance(
	Object targetElement,
	ObjectConstruction aspectConstruction
)

Parameters

targetElement
Type: System.Object
Code element (Assembly, Type, FieldInfo, MethodBase, PropertyInfo, EventInfo, ParameterInfo, or LocationInfo) to which the current AspectInstance is applied.
aspectConstruction
Type: PostSharp.Reflection.ObjectConstruction
An ObjectConstruction instructing how the aspect instance should be constructed.
See Also