CopyDictionary

StockSharp.Xaml.Diagram.GXDiagram.Model.GraphLinksModel`4

This nested class is used during copying to hold a mapping of original nodes to newly copied nodes and original links to newly copied links.

Implements: ICopyDictionary

Properties

Copies
public DataCollection<NodeType, NodeKey, PortKey, LinkType> Copies { get; }
value = copyDictionary.Copies

Gets the collection of copied nodes and copied links as a DataCollection.

DestinationModel
public GraphLinksModel<NodeType, NodeKey, PortKey, LinkType> DestinationModel { get; set; }
value = copyDictionary.DestinationModel
copyDictionary.DestinationModel = value

Gets or sets the destination model for the copying operation.

SourceCollection
public DataCollection<NodeType, NodeKey, PortKey, LinkType> SourceCollection { get; set; }
value = copyDictionary.SourceCollection
copyDictionary.SourceCollection = value

Gets or sets the source collection of data to be copied for the copying operation.

SourceModel
public GraphLinksModel<NodeType, NodeKey, PortKey, LinkType> SourceModel { get; set; }
value = copyDictionary.SourceModel
copyDictionary.SourceModel = value

Gets or sets the source model for the copying operation.

Methods

AddCopiedNode
public void AddCopiedNode(NodeType oldnode, NodeType newnode)
copyDictionary.AddCopiedNode(oldnode, newnode)

Declare the mapping of a source node data to a copied node data.

oldnode
a node data in the source collection
newnode
a copied node data, or null to indicate that there is no copied node data for a given source node data
ContainsSourceNode
public bool ContainsSourceNode(NodeType oldnode)
result = copyDictionary.ContainsSourceNode(oldnode)

This predicate is true if the given node data is in the source collection.

oldnode
FindCopiedNode
public NodeType FindCopiedNode(NodeType oldnode)
result = copyDictionary.FindCopiedNode(oldnode)

Look up the copied node for a given source node.

oldnode
a source node data

Returns: the copied node data

RemoveSourceNode
public void RemoveSourceNode(NodeType srcnodedata)
copyDictionary.RemoveSourceNode(srcnodedata)

Remove any association between a source node data and any copied node data.

srcnodedata
a node data in the source collection