CompositionDiagramElement

StockSharp.Diagram

Composite element.

Inherits: DiagramElement

Constructors

CompositionDiagramElement
public CompositionDiagramElement(ICompositionModel model)
compositionDiagramElement = CompositionDiagramElement(model)

Initializes a new instance of the CompositionDiagramElement.

model
ICompositionModel

Properties

Category
public string Category { get; set; }
value = compositionDiagramElement.Category
compositionDiagramElement.Category = value

The name of the group which includes a diagram element.

DocUrl
public override string DocUrl { get; set; }
value = compositionDiagramElement.DocUrl
compositionDiagramElement.DocUrl = value

Help url.

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

Elements

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

HasErrors

HasUndoManager
public override bool HasUndoManager { get; }
value = compositionDiagramElement.HasUndoManager

Check if undo manager is defined

IconName
public override string IconName { get; }
value = compositionDiagramElement.IconName

Icon resource name.

IsLoaded
public bool IsLoaded { get; set; }
value = compositionDiagramElement.IsLoaded
compositionDiagramElement.IsLoaded = value

Is composite diagram element loaded.

IsUndoRedoing
public override bool IsUndoRedoing { get; }
value = compositionDiagramElement.IsUndoRedoing

Whether undo/redo operation is in progress.

LastError
public Exception LastError { get; internal set; }
value = compositionDiagramElement.LastError
compositionDiagramElement.LastError = value

The last error.

LastErrorElement
public DiagramElement LastErrorElement { get; internal set; }
value = compositionDiagramElement.LastErrorElement
compositionDiagramElement.LastErrorElement = value

The last error element.

Model
public ICompositionModel Model { get; set; }
value = compositionDiagramElement.Model
compositionDiagramElement.Model = value

ICompositionModel

Parameters
public override IEnumerable<IDiagramElementParam> Parameters { get; }
value = compositionDiagramElement.Parameters

Diagram element settings.

SchemaVersion
public int SchemaVersion { get; set; }
value = compositionDiagramElement.SchemaVersion
compositionDiagramElement.SchemaVersion = value

Schema version.

Strategy
public override DiagramStrategy Strategy { get; set; }
value = compositionDiagramElement.Strategy
compositionDiagramElement.Strategy = value

The strategy to which the element is attached.

TypeId
public override Guid TypeId { get; }
value = compositionDiagramElement.TypeId

The unique identifier of the diagram element type.

Methods

CanRedo
public bool CanRedo()
result = compositionDiagramElement.CanRedo()

This predicate is true when one can call Redo.

Returns: Check result.

CanUndo
public bool CanUndo()
result = compositionDiagramElement.CanUndo()

This predicate is true when one can call Undo.

Returns: Check result.

Clone
public override DiagramElement Clone(bool cloneSockets)
result = compositionDiagramElement.Clone(cloneSockets)

Create a copy of CompositionDiagramElement.

cloneSockets
To create copies of connections.

Returns: Copy.

ConnectedToSockets
public IEnumerable<DiagramSocket> ConnectedToSockets(DiagramSocket socket)
result = compositionDiagramElement.ConnectedToSockets(socket)

Other sockets if this one is connected.

socket
DiagramSocket

Returns: Connected sockets.

CreateSocketInstance
protected override DiagramSocket CreateSocketInstance(DiagramSocketDirection dir, string socketId)
result = compositionDiagramElement.CreateSocketInstance(dir, socketId)

Create new socket instance.

FindMarketDepthPanels
public IEnumerable<MarketDepthPanelDiagramElement> FindMarketDepthPanels()
result = compositionDiagramElement.FindMarketDepthPanels()

Find all MarketDepthPanelDiagramElement.

FindPortfolios
public IEnumerable<Portfolio> FindPortfolios()
result = compositionDiagramElement.FindPortfolios()

Find all portfolios in elements.

Flush
public override void Flush(DateTime time)
compositionDiagramElement.Flush(time)

Flush non trigger (root) elements.

GetCategory
public override string GetCategory()
result = compositionDiagramElement.GetCategory()

Get category.

Returns: Category.

GetDescription
public override string GetDescription()
result = compositionDiagramElement.GetDescription()

Get description.

Returns: Description.

GetDisplayName
public override string GetDisplayName()
result = compositionDiagramElement.GetDisplayName()

Get display name.

Returns: Name.

Load
public override void Load(SettingsStorage storage)
compositionDiagramElement.Load(storage)

Load settings.

storage
Settings storage.
OnInit
protected override void OnInit()
compositionDiagramElement.OnInit()

The method is called at initialization of the diagram element.

OnPrepare
protected override void OnPrepare()
compositionDiagramElement.OnPrepare()

To prepare for starting the diagram element algorithm.

OnProcess
protected override void OnProcess(DateTime time, IDictionary<DiagramSocket, DiagramSocketValue> values, DiagramSocketValue source)
compositionDiagramElement.OnProcess(time, values, source)

The method is called at the processing of the new incoming values.

time
Time.
values
Values.
source
Source value.
OnReseted
protected override void OnReseted()
compositionDiagramElement.OnReseted()

The method is called at re-initialisation of the diagram element state.

OnSocketConnected
protected override void OnSocketConnected(DiagramSocket socket, DiagramSocket source)
compositionDiagramElement.OnSocketConnected(socket, source)

The method is called at subscription to the processing of diagram element output values.

socket
The diagram element socket.
source
The source diagram element socket.
OnSocketDisconnected
protected override void OnSocketDisconnected(DiagramSocket socket, DiagramSocket source)
compositionDiagramElement.OnSocketDisconnected(socket, source)

The method is called at unsubscription from the processing of diagram element output values.

socket
The diagram element socket.
source
The source diagram element socket.
OnStart
protected override void OnStart(DateTime time)
compositionDiagramElement.OnStart(time)

The method is called at the start of the diagram element algorithm.

OnStop
protected override void OnStop()
compositionDiagramElement.OnStop()

The method is called at the stop of the diagram element algorithm.

OnUnInit
protected override void OnUnInit()
compositionDiagramElement.OnUnInit()

The method is called at deinitialization of the diagram element.

RaiseChanged
protected void RaiseChanged()
compositionDiagramElement.RaiseChanged()

Invoke Changed.

RaiseElementAdded
protected void RaiseElementAdded(DiagramElement element)
compositionDiagramElement.RaiseElementAdded(element)

Invoke ElementAdded.

element
DiagramElement
RaiseElementRemoved
protected void RaiseElementRemoved(DiagramElement element)
compositionDiagramElement.RaiseElementRemoved(element)

Invoke ElementRemoved.

element
DiagramElement
RaiseParameterValueChanged
protected override void RaiseParameterValueChanged(string parameterName)
compositionDiagramElement.RaiseParameterValueChanged(parameterName)

To call the ParameterValueChanged event.

parameterName
Parameter name.
RaiseStrategyChanged
protected void RaiseStrategyChanged()
compositionDiagramElement.RaiseStrategyChanged()

Invoke StrategyChanged.

Redo
public void Redo()
compositionDiagramElement.Redo()

Restore the state of some models to after the current state.

ResumeUndoManager
public void ResumeUndoManager()
compositionDiagramElement.ResumeUndoManager()

Resume undo/redo manager for Model.

Save
public override void Save(SettingsStorage storage)
compositionDiagramElement.Save(storage)

Save settings.

storage
Settings storage.
SetTypeId
protected void SetTypeId(Guid typeId)
compositionDiagramElement.SetTypeId(typeId)

TypeId

typeId
TypeId
SuspendUndoManager
public void SuspendUndoManager()
compositionDiagramElement.SuspendUndoManager()

Suspend undo/redo manager for Model.

Undo
public void Undo()
compositionDiagramElement.Undo()

Restore the state of some models to before the current state.

UpdateTypeId
public void UpdateTypeId(Guid? id)
compositionDiagramElement.UpdateTypeId(id)

Update TypeId for composition elements.

id
New value for TypeId. Can be .

Events

Changed
public event Action Changed
compositionDiagramElement.Changed += handler

The composite element diagram change event.

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

Child element added.

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

Child element removed.

StrategyChanged
public event Action StrategyChanged
compositionDiagramElement.StrategyChanged += handler

Raised when strategy changed.