CopyContextCloneIfNotMappedT Method |
Looks for a mapping for this object that was added with
AddObjectMappingT(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
CloneT(T). Derived classes can override this default behavior.
Namespace:
AGI.Foundation.Infrastructure
Assembly:
AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax public 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