Table of Contents

Class CompositionDiagramElement

Namespace
StockSharp.Diagram
Assembly
StockSharp.Diagram.Core.dll

Composite element.

[Display(ResourceType = typeof(LocalizedStrings), Name = "CompositeElement", Description = "CompositeElement", GroupName = "OwnElements")]
public class CompositionDiagramElement : DiagramElement, ILogReceiver, ILogSource, IDisposable, INotifyPropertyChanging, INotifyPropertyChanged, ICustomTypeDescriptor, INotifyPropertiesChanged, IPersistable
Inheritance
CompositionDiagramElement
Implements
INotifyPropertiesChanged
IPersistable
Inherited Members
Extension Methods

Constructors

CompositionDiagramElement(ICompositionModel)

Initializes a new instance of the CompositionDiagramElement.

public CompositionDiagramElement(ICompositionModel model)

Parameters

model ICompositionModel

ICompositionModel

Properties

Category

The name of the group which includes a diagram element.

public string Category { get; set; }

Property Value

string

Description

The diagram element description.

public string Description { get; set; }

Property Value

string

DocUrl

Help url.

public override string DocUrl { get; set; }

Property Value

string

Elements

public IEnumerable<DiagramElement> Elements { get; }

Property Value

IEnumerable<DiagramElement>

HasErrors

public bool HasErrors { get; }

Property Value

bool

HasUndoManager

Check if undo manager is defined

public override bool HasUndoManager { get; }

Property Value

bool

IconName

Icon resource name.

public override string IconName { get; }

Property Value

string

IsLoaded

Is composite diagram element loaded.

public bool IsLoaded { get; set; }

Property Value

bool

IsUndoRedoing

Whether undo/redo operation is in progress.

public override bool IsUndoRedoing { get; }

Property Value

bool

LastError

The last error.

public Exception LastError { get; }

Property Value

Exception

LastErrorElement

The last error element.

public DiagramElement LastErrorElement { get; }

Property Value

DiagramElement

Model

[Browsable(false)]
public ICompositionModel Model { get; set; }

Property Value

ICompositionModel

Parameters

Diagram element settings.

public override IEnumerable<IDiagramElementParam> Parameters { get; }

Property Value

IEnumerable<IDiagramElementParam>

SchemaVersion

Schema version.

public int SchemaVersion { get; set; }

Property Value

int

Strategy

The strategy to which the element is attached.

public override DiagramStrategy Strategy { get; set; }

Property Value

DiagramStrategy

Type

Scheme type.

public SchemeTypes Type { get; set; }

Property Value

SchemeTypes

TypeId

The unique identifier of the diagram element type.

public override Guid TypeId { get; }

Property Value

Guid

Methods

CanRedo()

This predicate is true when one can call Redo().

public bool CanRedo()

Returns

bool

Check result.

CanUndo()

This predicate is true when one can call Undo().

public bool CanUndo()

Returns

bool

Check result.

Clone(bool)

Create a copy of CompositionDiagramElement.

public override DiagramElement Clone(bool cloneSockets = true)

Parameters

cloneSockets bool

To create copies of connections.

Returns

DiagramElement

Copy.

ConnectedToSockets(DiagramSocket)

Other sockets if this one is connected.

public IEnumerable<DiagramSocket> ConnectedToSockets(DiagramSocket socket)

Parameters

socket DiagramSocket

DiagramSocket

Returns

IEnumerable<DiagramSocket>

Connected sockets.

CreateSocketInstance(DiagramSocketDirection, string)

Create new socket instance.

protected override DiagramSocket CreateSocketInstance(DiagramSocketDirection dir, string socketId = null)

Parameters

dir DiagramSocketDirection
socketId string

Returns

DiagramSocket

FindMarketDepthPanels()

public IEnumerable<MarketDepthPanelDiagramElement> FindMarketDepthPanels()

Returns

IEnumerable<MarketDepthPanelDiagramElement>

FindPortfolios()

Find all portfolios in elements.

public IEnumerable<Portfolio> FindPortfolios()

Returns

IEnumerable<Portfolio>

Flush(DateTimeOffset)

Flush non trigger (root) elements.

public override void Flush(DateTimeOffset time)

Parameters

time DateTimeOffset

GetCategory()

Get category.

public override string GetCategory()

Returns

string

Category.

GetDescription()

Get description.

public override string GetDescription()

Returns

string

Description.

GetDisplayName()

Get display name.

public override string GetDisplayName()

Returns

string

Name.

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

OnInit()

The method is called at initialization of the diagram element.

protected override void OnInit()

OnPrepare()

To prepare for starting the diagram element algorithm.

protected override void OnPrepare()

OnProcess(DateTimeOffset, IDictionary<DiagramSocket, DiagramSocketValue>, DiagramSocketValue)

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

protected override void OnProcess(DateTimeOffset time, IDictionary<DiagramSocket, DiagramSocketValue> values, DiagramSocketValue source)

Parameters

time DateTimeOffset

Time.

values IDictionary<DiagramSocket, DiagramSocketValue>

Values.

source DiagramSocketValue

Source value.

OnReseted()

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

protected override void OnReseted()

OnSocketConnected(DiagramSocket, DiagramSocket)

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

protected override void OnSocketConnected(DiagramSocket socket, DiagramSocket source)

Parameters

socket DiagramSocket

The diagram element socket.

source DiagramSocket

The source diagram element socket.

OnSocketDisconnected(DiagramSocket, DiagramSocket)

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

protected override void OnSocketDisconnected(DiagramSocket socket, DiagramSocket source)

Parameters

socket DiagramSocket

The diagram element socket.

source DiagramSocket

The source diagram element socket.

OnStart(DateTimeOffset)

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

protected override void OnStart(DateTimeOffset time)

Parameters

time DateTimeOffset

OnStop()

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

protected override void OnStop()

OnUnInit()

The method is called at deinitialization of the diagram element.

protected override void OnUnInit()

RaiseChanged()

Invoke Changed.

protected void RaiseChanged()

RaiseElementAdded(DiagramElement)

Invoke ElementAdded.

protected void RaiseElementAdded(DiagramElement element)

Parameters

element DiagramElement

DiagramElement

RaiseElementRemoved(DiagramElement)

protected void RaiseElementRemoved(DiagramElement element)

Parameters

element DiagramElement

DiagramElement

RaiseParameterValueChanged(string)

To call the ParameterValueChanged event.

protected override void RaiseParameterValueChanged(string parameterName)

Parameters

parameterName string

Parameter name.

RaiseStrategyChanged()

protected void RaiseStrategyChanged()

Redo()

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

public void Redo()

ResumeUndoManager()

Resume undo/redo manager for Model.

public void ResumeUndoManager()

Save(SettingsStorage)

Save settings.

public override void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

SetTypeId(Guid)

protected void SetTypeId(Guid typeId)

Parameters

typeId Guid

TypeId

SuspendUndoManager()

Suspend undo/redo manager for Model.

public void SuspendUndoManager()

Undo()

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

public void Undo()

UpdateTypeId(Guid?)

Update TypeId for composition elements.

public void UpdateTypeId(Guid? id = null)

Parameters

id Guid?

New value for TypeId. Can be null.

Events

Changed

The composite element diagram change event.

public event Action Changed

Event Type

Action

ElementAdded

Child element added.

public event Action<DiagramElement> ElementAdded

Event Type

Action<DiagramElement>

ElementRemoved

Child element removed.

public event Action<DiagramElement> ElementRemoved

Event Type

Action<DiagramElement>

StrategyChanged

Raised when strategy changed.

public event Action StrategyChanged

Event Type

Action