PostSharp6.0/API Reference/Post­Sharp.​Aspects Namespace/Instance­Level­Aspect Class/Instance­Level­Aspect Methods/Instance­Level­Aspect.​Create­Instance Method

InstanceLevelAspect.CreateInstance Method

Creates a new instance of the aspect based on the current instance, serving as a prototype.

Namespace:  PostSharp.Aspects
Assembly:  PostSharp (in PostSharp.dll) Version: 6.1.6.0 (6.1.6.0)
Syntax
C#
public virtual Object CreateInstance(
	AdviceArgs adviceArgs
)

Parameters

adviceArgs
Type: PostSharp.Aspects.AdviceArgs
Aspect arguments.

Return Value

Type: Object
A new instance of the aspect, typically a clone of the current prototype instance.

Implements

IInstanceScopedAspect.CreateInstance(AdviceArgs)
Remarks
This method is typically implemented by invoking MemberwiseClone().
See Also