EntityObjectDuplicateObject Method |
Creates a copy of the object.
Namespace:
Aloe.SystemFrameworks.Domain
Assembly:
Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntaxpublic EntityObject DuplicateObject(
EntityObject owner = null,
IEnumerable<EntityObject> childObjects = null,
Func<EntityObject, EntityObject, IDataAttribute, bool> handleAttribute = null,
IDictionary<EntityObject, EntityObject> pairs = null,
ObjectTransaction transaction = null
)
Public Function DuplicateObject (
Optional owner As EntityObject = Nothing,
Optional childObjects As IEnumerable(Of EntityObject) = Nothing,
Optional handleAttribute As Func(Of EntityObject, EntityObject, IDataAttribute, Boolean) = Nothing,
Optional pairs As IDictionary(Of EntityObject, EntityObject) = Nothing,
Optional transaction As ObjectTransaction = Nothing
) As EntityObject
public:
EntityObject^ DuplicateObject(
EntityObject^ owner = nullptr,
IEnumerable<EntityObject^>^ childObjects = nullptr,
Func<EntityObject^, EntityObject^, IDataAttribute^, bool>^ handleAttribute = nullptr,
IDictionary<EntityObject^, EntityObject^>^ pairs = nullptr,
ObjectTransaction^ transaction = nullptr
)
member DuplicateObject :
?owner : EntityObject *
?childObjects : IEnumerable<EntityObject> *
?handleAttribute : Func<EntityObject, EntityObject, IDataAttribute, bool> *
?pairs : IDictionary<EntityObject, EntityObject> *
?transaction : ObjectTransaction
(* Defaults:
let _owner = defaultArg owner null
let _childObjects = defaultArg childObjects null
let _handleAttribute = defaultArg handleAttribute null
let _pairs = defaultArg pairs null
let _transaction = defaultArg transaction null
*)
-> EntityObject
Parameters
- owner (Optional)
- Type: Aloe.SystemFrameworks.DomainEntityObject
The owner of the copy. - childObjects (Optional)
- Type: System.Collections.GenericIEnumerableEntityObject
The child objects to duplicate. Can be union of several child collections or just some of the child objects. - handleAttribute (Optional)
- Type: SystemFuncEntityObject, EntityObject, IDataAttribute, Boolean
A function executed for every attribute: bool handleAttribute(original, copy, attribute). It must return true if the attribute is handled. - pairs (Optional)
- Type: System.Collections.GenericIDictionaryEntityObject, EntityObject
A dictionary that collects the original-copy pairs. - transaction (Optional)
- Type: Aloe.SystemFrameworks.DomainObjectTransaction
Transaction to use when creating a new instance or null to use the current transaction
Return Value
Type:
EntityObject
See Also