ICompositionModel

StockSharp.Diagram

CompositionDiagramElement model.

Implements: ICloneable<ICompositionModel>, ICloneable

Properties

Behavior
public object Behavior { get; }
value = iCompositionModel.Behavior

ICompositionModelBehavior

Elements
public IEnumerable<DiagramElement> Elements { get; }
value = iCompositionModel.Elements

Child elements.

HasErrors
public bool HasErrors { get; }
value = iCompositionModel.HasErrors

To check the composite element for errors in diagram.

IsUndoManagerSuspended
public bool IsUndoManagerSuspended { get; set; }
value = iCompositionModel.IsUndoManagerSuspended
iCompositionModel.IsUndoManagerSuspended = value

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

Modifiable
public bool Modifiable { get; set; }
value = iCompositionModel.Modifiable
iCompositionModel.Modifiable = value

Is it possible to edit a composite element diagram.

UndoManager
public IUndoManager UndoManager { get; set; }
value = iCompositionModel.UndoManager
iCompositionModel.UndoManager = value

IUndoManager

Methods

AddElement
public void AddElement(DiagramElement element, PointF location)
iCompositionModel.AddElement(element, location)

Add element.

element
The diagram element.
location
Element position.
FindElementByKey
public DiagramElement FindElementByKey(string key)
result = iCompositionModel.FindElementByKey(key)

Find element by unique key.

key
Key.

Returns: DiagramElement

GetConnectedSocketsFor
public IEnumerable<DiagramSocket> GetConnectedSocketsFor(DiagramElement element, DiagramSocket socket)
result = iCompositionModel.GetConnectedSocketsFor(element, socket)

Get connected sockets.

element
DiagramElement
socket
DiagramSocket

Returns: Connected sockets.

GetDisconnectedSockets
public IEnumerable<ValueTuple<string, DiagramSocket>> GetDisconnectedSockets()
result = iCompositionModel.GetDisconnectedSockets()

Get disconnected sockets.

Returns: Disconnected sockets.

GetElementKey
public string GetElementKey(DiagramElement element)
result = iCompositionModel.GetElementKey(element)

Get element unique key.

element
DiagramElement

Returns: Key.

Events

ElementAdded
public event Action<DiagramElement> ElementAdded
iCompositionModel.ElementAdded += handler

Child element added event.

ElementRemoved
public event Action<DiagramElement> ElementRemoved
iCompositionModel.ElementRemoved += handler

Child element removed event.

ModelChanged
public event Action ModelChanged
iCompositionModel.ModelChanged += handler

Changed event.