ICopyable

Description

interface Tinman.Core.Util.ICopyable<T out ref>

Extended by

CxNode abstract
DirectXConstantBufferInfo sealed
IVisual
XmlNode abstract

Base interface for classes that can create independent copies of their instances.

Typically, there is a concept of cloning in the native programming environment, which can be utilized to create copies of existing objects. However, the semantic rules vary between programming environments and are often left rather unspecific.

Public / Methods

Copy


[Pure]
public method Copy → ()

returns → T

The independent copy of this object.

Creates an independent copy of this object.

There are no rules on how the independent copy must be created, but the following must hold true:

  • Given that neither this nor the returned object is modified, both objects must exhibit the exact same behaviour.

  • A modification that is performed on the returned object must not affect the behaviour of this object in any way.

The independent copy may be this object, for example if it is a fly-weight immutable object.