Table of Contents

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>

ICompositionModelBehavior<TNode, TLink>

Properties

Elements

Child elements.

public IEnumerable<DiagramElement> Elements { get; }

Property Value

IEnumerable<DiagramElement>

IsUndoManagerSuspended

Undo manager is suspended if this property is set to true.

public bool IsUndoManagerSuspended { get; set; }

Property Value

bool

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

bool

Nodes

Nodes.

public IEnumerable<TNode> Nodes { get; set; }

Property Value

IEnumerable<TNode>

UndoManager

public IUndoManager UndoManager { get; set; }

Property Value

IUndoManager

Methods

Add link.

public void AddLink(TNode from, string fromPort, TNode to, string toPort)

Parameters

from TNode

From node.

fromPort string

FromPort

to TNode

To node.

toPort string

ToPort

AddNode(TNode)

Add node.

public void AddNode(TNode node)

Parameters

node TNode

TNode

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 string

Transaction name.

action Action<CompositionModel<TNode, TLink>>

Action.

Remove link.

public void RemoveLink(TNode from, string fromPort, TNode to, string toPort)

Parameters

from TNode

From node.

fromPort string

FromPort

to TNode

To node.

toPort string

ToPort

RemoveNode(TNode)

Remove node.

public void RemoveNode(TNode node)

Parameters

node TNode

TNode

Events

ElementAdded

Child element added event.

public event Action<DiagramElement> ElementAdded

Event Type

Action<DiagramElement>

ElementRemoved

Child element removed event.

public event Action<DiagramElement> ElementRemoved

Event Type

Action<DiagramElement>

ModelChanged

Changed event.

public event Action ModelChanged

Event Type

Action