PostSharp 4.3 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Aspects Namespace / Aspect­Instance Class / Aspect­Instance Constructor / Aspect­Instance Constructor (Object, Object­Construction, Aspect­Configuration)
AspectInstance Constructor (Object, ObjectConstruction, AspectConfiguration)
Initializes a new AspectInstance from

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

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.
aspectConfiguration
Type: PostSharp.Aspects.Configuration.AspectConfiguration
An optional configuration object whose type corresponds to the aspect type.
See Also