Duplicates an object instance, not including its unique ID.
Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 9.0.565.0 (9.0.565)
Syntax
T DeepClone<T, TManager>( T cloneFrom ) where T : new(), Object 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: TThe cloned object.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | When the cloneFrom object is null |
ArgumentException | When 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