T
EnsureClonedInstance<T>(PersistableObject) Method
See Also 
SourceCode.Framework Namespace > PersistableObject Class > EnsureClonedInstance Method : EnsureClonedInstance<T>(PersistableObject) Method



originalItem

Glossary Item Box

Returns an instance of a cloned object based on the original item. Use in conjuction with Cloning.

Syntax

Visual Basic (Declaration) 
Protected Overloads Function EnsureClonedInstance(Of T As PersistableObject)( _
   ByVal originalItem As PersistableObject _
) As T
Visual Basic (Usage)Copy Code
Dim instance As PersistableObject
Dim originalItem As PersistableObject
Dim value As T
 
value = instance.EnsureClonedInstance(Of T)(originalItem)
C# 
protected T EnsureClonedInstance<T>( 
   PersistableObject originalItem
)
where T: PersistableObject
C++/CLI 
protected:
T^ EnsureClonedInstancegeneric<typename T>
( 
   PersistableObject^ originalItem
) 
where T: PersistableObject

Parameters

originalItem

Type Parameters

T

Return Value

Returns the cloned instance if the object has been cloned.

Remarks

The cloned instance will be returned if the object has been cloned before. If the clone did not execute in context, the original item will be cloned every time the method is called. If a cloning context exists, the object will be cloned only once, and will return the same instance in subsequent calls.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also