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

AspectInstance Constructor (Object, IAspect)

Initializes a new AspectInstance from a runtime aspect instance (IAspect).

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

Parameters

targetElement
Type: System.Object
Code element (Assembly, Type, FieldInfo, MethodBase, PropertyInfo, EventInfo, ParameterInfo, or LocationInfo) to which the current AspectInstance is applied.
aspect
Type: PostSharp.Aspects.IAspect
The aspect runtime instance.
See Also