PostSharp 6.6 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Aspects Namespace / IInstance­Scoped­Aspect Interface / IInstance­Scoped­Aspect Methods / IInstance­Scoped­Aspect.​Create­Instance Method

IInstanceScopedAspect.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.6.14.0 (6.6.14.0)
Syntax
C#
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.
Remarks
This method is typically implemented by invoking MemberwiseClone().
See Also