Class CompositionModel<TNode, TLink>
- Namespace
- StockSharp.Diagram
- Assembly
- StockSharp.Diagram.Core.dll
Default implementation of ICompositionModel.
public class CompositionModel<TNode, TLink> : ICompositionModel, ICloneable<ICompositionModel>, ICloneable where TNode : ICompositionModelNode, new() where TLink : ICompositionModelLink, new()
Type Parameters
TNode
Node type.
TLink
Link type.
- Inheritance
-
CompositionModel<TNode, TLink>
- Implements
-
ICloneable<ICompositionModel>
- Inherited Members
- Extension Methods
Constructors
CompositionModel(ICompositionModelBehavior<TNode, TLink>)
Initializes a new instance of the CompositionModel<TNode, TLink>.
public CompositionModel(ICompositionModelBehavior<TNode, TLink> behavior)
Parameters
behavior
ICompositionModelBehavior<TNode, TLink>
Properties
Elements
Child elements.
public IEnumerable<DiagramElement> Elements { get; }
Property Value
IsUndoManagerSuspended
Undo manager is suspended if this property is set to true.
public bool IsUndoManagerSuspended { get; set; }
Property Value
Links
Links.
public IEnumerable<TLink> Links { get; set; }
Property Value
- IEnumerable<TLink>
Modifiable
Is it possible to edit a composite element diagram.
public bool Modifiable { get; set; }
Property Value
Nodes
Nodes.
public IEnumerable<TNode> Nodes { get; set; }
Property Value
- IEnumerable<TNode>
UndoManager
public IUndoManager UndoManager { get; set; }
Property Value
Methods
AddLink(TNode, string, TNode, string)
Add link.
public void AddLink(TNode from, string fromPort, TNode to, string toPort)
Parameters
AddNode(TNode)
Add node.
public void AddNode(TNode node)
Parameters
node
TNodeTNode
ExecuteTransaction(string, Action<CompositionModel<TNode, TLink>>)
Execute the specified action in transaction scope.
public void ExecuteTransaction(string name, Action<CompositionModel<TNode, TLink>> action)
Parameters
name
stringTransaction name.
action
Action<CompositionModel<TNode, TLink>>Action.
RemoveLink(TNode, string, TNode, string)
Remove link.
public void RemoveLink(TNode from, string fromPort, TNode to, string toPort)
Parameters
RemoveNode(TNode)
Remove node.
public void RemoveNode(TNode node)
Parameters
node
TNodeTNode
Events
ElementAdded
Child element added event.
public event Action<DiagramElement> ElementAdded
Event Type
ElementRemoved
Child element removed event.
public event Action<DiagramElement> ElementRemoved
Event Type
ModelChanged
Changed event.
public event Action ModelChanged