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
-
INotifyPropertiesChangedIPersistable
- Inherited Members
- Extension Methods
Constructors
CompositionDiagramElement(ICompositionModel)
Initializes a new instance of the CompositionDiagramElement.
public CompositionDiagramElement(ICompositionModel model)
Parameters
Properties
Category
The name of the group which includes a diagram element.
public string Category { get; set; }
Property Value
Description
The diagram element description.
public string Description { get; set; }
Property Value
DocUrl
Help url.
public override string DocUrl { get; set; }
Property Value
Elements
public IEnumerable<DiagramElement> Elements { get; }
Property Value
HasErrors
public bool HasErrors { get; }
Property Value
HasUndoManager
Check if undo manager is defined
public override bool HasUndoManager { get; }
Property Value
IconName
Icon resource name.
public override string IconName { get; }
Property Value
IsLoaded
Is composite diagram element loaded.
public bool IsLoaded { get; set; }
Property Value
IsUndoRedoing
Whether undo/redo operation is in progress.
public override bool IsUndoRedoing { get; }
Property Value
LastError
The last error.
public Exception LastError { get; }
Property Value
LastErrorElement
The last error element.
public DiagramElement LastErrorElement { get; }
Property Value
Model
[Browsable(false)]
public ICompositionModel Model { get; set; }
Property Value
Parameters
Diagram element settings.
public override IEnumerable<IDiagramElementParam> Parameters { get; }
Property Value
SchemaVersion
Schema version.
public int SchemaVersion { get; set; }
Property Value
Strategy
The strategy to which the element is attached.
public override DiagramStrategy Strategy { get; set; }
Property Value
Type
Scheme type.
public SchemeTypes Type { get; set; }
Property Value
TypeId
The unique identifier of the diagram element type.
public override Guid TypeId { get; }
Property Value
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
boolTo 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
Returns
- IEnumerable<DiagramSocket>
Connected sockets.
CreateSocketInstance(DiagramSocketDirection, string)
Create new socket instance.
protected override DiagramSocket CreateSocketInstance(DiagramSocketDirection dir, string socketId = null)
Parameters
dir
DiagramSocketDirectionsocketId
string
Returns
FindMarketDepthPanels()
Find all MarketDepthPanelDiagramElement.
public IEnumerable<MarketDepthPanelDiagramElement> FindMarketDepthPanels()
Returns
FindPortfolios()
Find all portfolios in elements.
public IEnumerable<Portfolio> FindPortfolios()
Returns
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
SettingsStorageSettings 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
DateTimeOffsetTime.
values
IDictionary<DiagramSocket, DiagramSocketValue>Values.
source
DiagramSocketValueSource 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
DiagramSocketThe diagram element socket.
source
DiagramSocketThe 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
DiagramSocketThe diagram element socket.
source
DiagramSocketThe 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
RaiseElementRemoved(DiagramElement)
Invoke ElementRemoved.
protected void RaiseElementRemoved(DiagramElement element)
Parameters
element
DiagramElement
RaiseParameterValueChanged(string)
To call the ParameterValueChanged event.
protected override void RaiseParameterValueChanged(string parameterName)
Parameters
parameterName
stringParameter name.
RaiseStrategyChanged()
Invoke StrategyChanged.
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
SettingsStorageSettings storage.
SetTypeId(Guid)
protected void SetTypeId(Guid typeId)
Parameters
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
Events
Changed
The composite element diagram change event.
public event Action Changed
Event Type
ElementAdded
Child element added.
public event Action<DiagramElement> ElementAdded
Event Type
ElementRemoved
Child element removed.
public event Action<DiagramElement> ElementRemoved
Event Type
StrategyChanged
Raised when strategy changed.
public event Action StrategyChanged