Click or drag to resize

ITransactionalEntityDeepCloneT, TManager Method


Duplicates an object instance, not including its unique ID.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.3.169
Syntax
T DeepClone<T, TManager>(
	T cloneFrom
)
where T : new(), Object, IEntity<TManager>
where TManager : ITransactionalEntity

Parameters

cloneFrom
Type: T
Original object to clone from

Type Parameters

T
Type of the original object
TManager
Type of the manager object

Return Value

Type: T
The cloned object.
Exceptions
ExceptionCondition
ArgumentNullExceptionWhen the cloneFrom object is null
ArgumentExceptionWhen the cloneFrom object was retrieved from a different session.
Remarks

Deep-cloning an object retains all of the original object's property values except the unique ID, creation user, creation time, last-modified user, and last-modified time.

The cloned object is re-augmented with all the session information.

Cloning a null object or an object from another session throws an error.

See Also