PostSharp 6.10 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Aspects Namespace / IClone­Aware­Aspect Interface / IClone­Aware­Aspect Methods / IClone­Aware­Aspect.​On­Cloned Method

ICloneAwareAspect.OnCloned Method

Method called after the an object enhanced by the current aspect has been cloned using MemberwiseClone(). The this parameter refers to the new aspect instance in the cloned object.

Namespace:  PostSharp.Aspects
Assembly:  PostSharp (in PostSharp.dll) Version: (
void OnCloned(
	ICloneAwareAspect source


Type: PostSharp.Aspects.ICloneAwareAspect
Aspect instance corresponding to the current aspect instance in the cloned target object.

Prior to calling the current method, the aspect framework initializes the source object using CreateInstance(AdviceArgs) and RuntimeInitializeInstance(). That is, the aspect instance in the cloned object is not cloned from the source aspect instance, but from the prototype aspect instance.

See Also