CopyContext.CloneIfNotMapped<T> Method |
Looks for a mapping for this object that was added with
AddObjectMapping<T>(T, T). If one is found,
the object to which the specified one is mapped is returned. If one is not found, this method clones the
given object by calling
Clone<T>(T). Derived classes can override this default behavior.
Namespace:
AGI.Foundation.Infrastructure
Assembly:
AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 25.1.421.0 (25.1.421.0)
Syntaxpublic virtual T CloneIfNotMapped<T>(
T oldObject
)
where T : class
Public Overridable Function CloneIfNotMapped(Of T As Class) (
oldObject As T
) As T
public:
generic<typename T>
where T : ref class
virtual T CloneIfNotMapped(
T oldObject
)
abstract CloneIfNotMapped :
oldObject : 'T -> 'T when 'T : not struct
override CloneIfNotMapped :
oldObject : 'T -> 'T when 'T : not struct
Parameters
- oldObject
- Type: T
The old object reference for which to look for a mapping or clone.
Type Parameters
- T
- The type of the object to clone.
Return Value
Type:
T
The object that the specified object is mapped to, or a cloned object if the specified object was not
mapped.
Exceptions
See Also