Skip to content

CopyContext Methods

Provides context for a copy operation.

DeepCopy(T?)

View source
public T? DeepCopy<T>(T? value)
Copies the provided value.

Parameters

valueT?
The value.

Returns

A copy of the provided value.

Dispose

View source
public void Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

RecordCopy(object, object)

View source
public void RecordCopy(object original, object copy)
Records a copy of an object.

Parameters

originalobject
The original value.
copyobject
The copy of original.

TryGetCopy(object?, T?)

View source
public bool TryGetCopy<T>(object? original, out T? result)
Returns the previously recorded copy of the provided object, if it exists.

Parameters

originalobject?
The original object.
resultT?
The previously recorded copy of original.

Returns

true if a copy of original has been recorded, false otherwise.