CompositionDiagramElement
Composite element.
Inherits: DiagramElement
Constructors
public CompositionDiagramElement(ICompositionModel model)
compositionDiagramElement = CompositionDiagramElement(model)
Initializes a new instance of the CompositionDiagramElement.
- model
- ICompositionModel
Properties
public string Category { get; set; }
value = compositionDiagramElement.Category
compositionDiagramElement.Category = value
The name of the group which includes a diagram element.
public override string DocUrl { get; set; }
value = compositionDiagramElement.DocUrl
compositionDiagramElement.DocUrl = value
Help url.
public IEnumerable<DiagramElement> Elements { get; }
value = compositionDiagramElement.Elements
Elements
public override bool HasUndoManager { get; }
value = compositionDiagramElement.HasUndoManager
Check if undo manager is defined
public override string IconName { get; }
value = compositionDiagramElement.IconName
Icon resource name.
public bool IsLoaded { get; set; }
value = compositionDiagramElement.IsLoaded
compositionDiagramElement.IsLoaded = value
Is composite diagram element loaded.
public override bool IsUndoRedoing { get; }
value = compositionDiagramElement.IsUndoRedoing
Whether undo/redo operation is in progress.
public Exception LastError { get; internal set; }
value = compositionDiagramElement.LastError
compositionDiagramElement.LastError = value
The last error.
public DiagramElement LastErrorElement { get; internal set; }
value = compositionDiagramElement.LastErrorElement
compositionDiagramElement.LastErrorElement = value
The last error element.
public ICompositionModel Model { get; set; }
value = compositionDiagramElement.Model
compositionDiagramElement.Model = value
ICompositionModel
public override IEnumerable<IDiagramElementParam> Parameters { get; }
value = compositionDiagramElement.Parameters
Diagram element settings.
public int SchemaVersion { get; set; }
value = compositionDiagramElement.SchemaVersion
compositionDiagramElement.SchemaVersion = value
Schema version.
public override DiagramStrategy Strategy { get; set; }
value = compositionDiagramElement.Strategy
compositionDiagramElement.Strategy = value
The strategy to which the element is attached.
public override Guid TypeId { get; }
value = compositionDiagramElement.TypeId
The unique identifier of the diagram element type.
Methods
public bool CanRedo()
result = compositionDiagramElement.CanRedo()
This predicate is true when one can call Redo.
Returns: Check result.
public bool CanUndo()
result = compositionDiagramElement.CanUndo()
This predicate is true when one can call Undo.
Returns: Check result.
public override DiagramElement Clone(bool cloneSockets)
result = compositionDiagramElement.Clone(cloneSockets)
Create a copy of CompositionDiagramElement.
- cloneSockets
- To create copies of connections.
Returns: Copy.
public IEnumerable<DiagramSocket> ConnectedToSockets(DiagramSocket socket)
result = compositionDiagramElement.ConnectedToSockets(socket)
Other sockets if this one is connected.
- socket
- DiagramSocket
Returns: Connected sockets.
protected override DiagramSocket CreateSocketInstance(DiagramSocketDirection dir, string socketId)
result = compositionDiagramElement.CreateSocketInstance(dir, socketId)
Create new socket instance.
public IEnumerable<MarketDepthPanelDiagramElement> FindMarketDepthPanels()
result = compositionDiagramElement.FindMarketDepthPanels()
Find all MarketDepthPanelDiagramElement.
public IEnumerable<Portfolio> FindPortfolios()
result = compositionDiagramElement.FindPortfolios()
Find all portfolios in elements.
public override void Flush(DateTime time)
compositionDiagramElement.Flush(time)
Flush non trigger (root) elements.
public override string GetCategory()
result = compositionDiagramElement.GetCategory()
Get category.
Returns: Category.
public override string GetDescription()
result = compositionDiagramElement.GetDescription()
Get description.
Returns: Description.
public override string GetDisplayName()
result = compositionDiagramElement.GetDisplayName()
Get display name.
Returns: Name.
public override void Load(SettingsStorage storage)
compositionDiagramElement.Load(storage)
Load settings.
- storage
- Settings storage.
protected override void OnInit()
compositionDiagramElement.OnInit()
The method is called at initialization of the diagram element.
protected override void OnPrepare()
compositionDiagramElement.OnPrepare()
To prepare for starting the diagram element algorithm.
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.
protected override void OnReseted()
compositionDiagramElement.OnReseted()
The method is called at re-initialisation of the diagram element state.
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.
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.
protected override void OnStart(DateTime time)
compositionDiagramElement.OnStart(time)
The method is called at the start of the diagram element algorithm.
protected override void OnStop()
compositionDiagramElement.OnStop()
The method is called at the stop of the diagram element algorithm.
protected override void OnUnInit()
compositionDiagramElement.OnUnInit()
The method is called at deinitialization of the diagram element.
protected void RaiseElementAdded(DiagramElement element)
compositionDiagramElement.RaiseElementAdded(element)
Invoke ElementAdded.
- element
- DiagramElement
protected void RaiseElementRemoved(DiagramElement element)
compositionDiagramElement.RaiseElementRemoved(element)
Invoke ElementRemoved.
- element
- DiagramElement
protected override void RaiseParameterValueChanged(string parameterName)
compositionDiagramElement.RaiseParameterValueChanged(parameterName)
To call the ParameterValueChanged event.
- parameterName
- Parameter name.
protected void RaiseStrategyChanged()
compositionDiagramElement.RaiseStrategyChanged()
Invoke StrategyChanged.
public void Redo()
compositionDiagramElement.Redo()
Restore the state of some models to after the current state.
public void ResumeUndoManager()
compositionDiagramElement.ResumeUndoManager()
Resume undo/redo manager for Model.
public override void Save(SettingsStorage storage)
compositionDiagramElement.Save(storage)
Save settings.
- storage
- Settings storage.
protected void SetTypeId(Guid typeId)
compositionDiagramElement.SetTypeId(typeId)
TypeId
- typeId
- TypeId
public void SuspendUndoManager()
compositionDiagramElement.SuspendUndoManager()
Suspend undo/redo manager for Model.
public void Undo()
compositionDiagramElement.Undo()
Restore the state of some models to before the current state.
public void UpdateTypeId(Guid? id)
compositionDiagramElement.UpdateTypeId(id)
Update TypeId for composition elements.
- id
- New value for TypeId. Can be .
Events
public event Action Changed
compositionDiagramElement.Changed += handler
The composite element diagram change event.
public event Action<DiagramElement> ElementAdded
compositionDiagramElement.ElementAdded += handler
Child element added.
public event Action<DiagramElement> ElementRemoved
compositionDiagramElement.ElementRemoved += handler
Child element removed.
public event Action StrategyChanged
compositionDiagramElement.StrategyChanged += handler
Raised when strategy changed.