Summary
A dictionary which maps objects to their copies.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Base Types
-
- Dictionary
<Object, Object>
- Dictionary
graph BT
Type-->Base0["Dictionary<Object, Object>"]
Type["CloneContext"]
class Type type-node
Syntax
public class CloneContext : Dictionary<Object, Object>
Remarks
This class is used to clone complex object trees with potentially interconnected references so that
references to original objects can be replaced with references to their equivalent clones.
Properties
Name | Value | Summary |
---|---|---|
WillCloneUpdatables | bool |
Will the
Animancer.IUpdatable s be cloned as part of the current operation? |
Methods
Name | Value | Summary |
---|---|---|
Clone |
T |
Calls
Animancer.ICloneable`1.Clone(Animancer.CloneContext) and registers the clone. |
GetClone |
T |
Returns the clone of the `original` if one was registered. Otherwise, throws.
|
GetCloneOrOriginal |
T |
Returns the clone of the `original` if one is registered. Otherwise, returns the `original`.
|
GetOrCreateClone |
T |
Returns the value registered using `original` as its key if there is one.
Otherwise, calls
Animancer.CloneableExtensions.Clone``1(Animancer.ICloneable{``0}) , adds the clone to this dictionary, and returns it.
|
Get |
T |
Returns the value registered using `original` as its key if there is one.
Otherwise, if the `original` is
Animancer.ICloneable`1 it calls Animancer.CloneableExtensions.Clone``1(Animancer.ICloneable{``0}) ,
adds the clone to this dictionary, and returns it.
Otherwise, just returns the `original`.
|
TryGetClone |
bool |
Replaces the `item` with its clone and returns true if one is registered.
|
TryGetClone |
bool |
Calls
System.Collections.Generic.Dictionary`2.TryGetValue(`0,`1@) and casts the result. |
Try |
bool |
Returns
true if there is a `clone` registered for the `original`.
Otherwise, if the `original` is Animancer.ICloneable`1 it calls Animancer.CloneableExtensions.Clone``1(Animancer.ICloneable{``0}) ,
adds the `clone` to this dictionary, and returns true .
Otherwise, outputs the `original` as the `clone` and returns false .
|