Class CompositionDiagramElement
Composite element.
Implements
Inherited Members
Namespace: StockSharp.Xaml.Diagram
Assembly: StockSharp.Xaml.Diagram.dll
Syntax
[DisplayNameLoc("CompositeElement")]
[DescriptionLoc("CompositeElement", true)]
[CategoryLoc("Str3050")]
public class CompositionDiagramElement : DiagramElement, IPersistable, ILogReceiver, ILogSource, IDisposable, INotifyPropertyChanging, INotifyPropertyChanged, ICustomTypeDescriptor, INotifyPropertiesChanged
Constructors
CompositionDiagramElement()
Initializes a new instance of the CompositionDiagramElement.
Declaration
public CompositionDiagramElement()
Properties
Category
The name of the group which includes a diagram element.
Declaration
public string Category { get; set; }
Property Value
Type | Description |
---|---|
String |
Description
The diagram element description.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String |
DocUrl
Help url.
Declaration
public string DocUrl { get; set; }
Property Value
Type | Description |
---|---|
String |
Elements
Child elements.
Declaration
public DiagramElement[] Elements { get; }
Property Value
Type | Description |
---|---|
DiagramElement[] |
HasErrors
To check the composite element for errors in diagram.
Declaration
public bool HasErrors { get; }
Property Value
Type | Description |
---|---|
Boolean |
IconName
Icon resource name.
Declaration
public override string IconName { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
IsLoaded
Is composite diagram element loaded.
Declaration
public bool IsLoaded { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IsModifiable
Is it possible to edit a composite element diagram.
Declaration
public bool IsModifiable { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
NeedFlush
Is need flush state (-1 means No).
Declaration
public override int NeedFlush { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Parameters
Diagram element settings.
Declaration
public override IEnumerable<IDiagramElementParam> Parameters { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IDiagramElementParam> |
Overrides
PublishedId
The published strategy identifier.
Declaration
public long PublishedId { get; set; }
Property Value
Type | Description |
---|---|
Int64 |
Revision
The content revision.
Declaration
public long Revision { get; set; }
Property Value
Type | Description |
---|---|
Int64 |
Strategy
The strategy to which the element is attached.
Declaration
public override DiagramStrategy Strategy { get; set; }
Property Value
Type | Description |
---|---|
DiagramStrategy |
Overrides
Type
Scheme type.
Declaration
public SchemeTypes Type { get; }
Property Value
Type | Description |
---|---|
SchemeTypes |
TypeId
The unique identifier of the diagram element type.
Declaration
public override Guid TypeId { get; }
Property Value
Type | Description |
---|---|
Guid |
Overrides
Methods
AddElement(DiagramElement, Point)
Add element.
Declaration
public void AddElement(DiagramElement element, Point location = null)
Parameters
Type | Name | Description |
---|---|---|
DiagramElement | element | The diagram element. |
Point | location | Element position. |
CanRedo()
This predicate is true when one can call Redo().
Declaration
public bool CanRedo()
Returns
Type | Description |
---|---|
Boolean | Check result. |
CanUndo()
This predicate is true when one can call Undo().
Declaration
public bool CanUndo()
Returns
Type | Description |
---|---|
Boolean | Check result. |
Clone(SchemeTypes)
Create a copy of CompositionDiagramElement.
Declaration
public CompositionDiagramElement Clone(SchemeTypes schemeType)
Parameters
Type | Name | Description |
---|---|---|
SchemeTypes | schemeType | Scheme type. |
Returns
Type | Description |
---|---|
CompositionDiagramElement | Copy. |
Clone(Boolean)
Create a copy of CompositionDiagramElement.
Declaration
public override DiagramElement Clone(bool cloneSockets = true)
Parameters
Type | Name | Description |
---|---|---|
Boolean | cloneSockets | To create copies of connections. |
Returns
Type | Description |
---|---|
DiagramElement | Copy. |
Overrides
Contains(DiagramElement)
Is composition contains element.
Declaration
public bool Contains(DiagramElement element)
Parameters
Type | Name | Description |
---|---|---|
DiagramElement | element | Element. |
Returns
Type | Description |
---|---|
Boolean | Check result. |
CreateSocketInstance(DiagramSocketDirection, String)
Create new socket instance.
Declaration
protected override DiagramSocket CreateSocketInstance(DiagramSocketDirection dir, string socketId = null)
Parameters
Type | Name | Description |
---|---|---|
DiagramSocketDirection | dir | |
String | socketId |
Returns
Type | Description |
---|---|
DiagramSocket |
Overrides
FindPortfolios()
Find all portfolios in elements.
Declaration
public IEnumerable<Portfolio> FindPortfolios()
Returns
Type | Description |
---|---|
IEnumerable<Portfolio> |
Flush()
Flush non trigger (root) elements.
Declaration
public override void Flush()
Overrides
Load(SettingsStorage)
Load settings.
Declaration
public override void Load(SettingsStorage storage)
Parameters
Type | Name | Description |
---|---|---|
Ecng.Serialization.SettingsStorage | storage | Settings storage. |
Overrides
OnInit()
The method is called at initialization of the diagram element.
Declaration
protected override void OnInit()
Overrides
OnProcess(DateTimeOffset, IDictionary<DiagramSocket, DiagramSocketValue>, DiagramSocketValue)
The method is called at the processing of the new incoming values.
Declaration
protected override void OnProcess(DateTimeOffset time, IDictionary<DiagramSocket, DiagramSocketValue> values, DiagramSocketValue source)
Parameters
Type | Name | Description |
---|---|---|
DateTimeOffset | time | Time. |
IDictionary<DiagramSocket, DiagramSocketValue> | values | Values. |
DiagramSocketValue | source | Source value. |
Overrides
OnReseted()
The method is called at re-initialisation of the diagram element state.
Declaration
protected override void OnReseted()
Overrides
OnSocketConnected(DiagramSocket, DiagramSocket)
The method is called at subscription to the processing of diagram element output values.
Declaration
protected override void OnSocketConnected(DiagramSocket socket, DiagramSocket source)
Parameters
Type | Name | Description |
---|---|---|
DiagramSocket | socket | The diagram element socket. |
DiagramSocket | source | The source diagram element socket. |
Overrides
OnSocketDisconnected(DiagramSocket, DiagramSocket)
The method is called at unsubscription from the processing of diagram element output values.
Declaration
protected override void OnSocketDisconnected(DiagramSocket socket, DiagramSocket source)
Parameters
Type | Name | Description |
---|---|---|
DiagramSocket | socket | The diagram element socket. |
DiagramSocket | source | The source diagram element socket. |
Overrides
OnStart()
The method is called at the start of the diagram element algorithm.
Declaration
protected override void OnStart()
Overrides
OnStop()
The method is called at the stop of the diagram element algorithm.
Declaration
protected override void OnStop()
Overrides
OnUnInit()
The method is called at deinitialization of the diagram element.
Declaration
protected override void OnUnInit()
Overrides
RaiseParameterValueChanged(String)
To call the ParameterValueChanged event.
Declaration
protected override void RaiseParameterValueChanged(string parameterName)
Parameters
Type | Name | Description |
---|---|---|
String | parameterName | Parameter name. |
Overrides
Redo()
Restore the state of some models to after the current state.
Declaration
public void Redo()
ResumeUndoManager()
Resume undo/redo manager for StockSharp.Xaml.Diagram.CompositionDiagramElement.Model.
Declaration
public void ResumeUndoManager()
Save(SettingsStorage)
Save settings.
Declaration
public override void Save(SettingsStorage storage)
Parameters
Type | Name | Description |
---|---|---|
Ecng.Serialization.SettingsStorage | storage | Settings storage. |
Overrides
SuspendUndoManager()
Suspend undo/redo manager for StockSharp.Xaml.Diagram.CompositionDiagramElement.Model.
Declaration
public void SuspendUndoManager()
Undo()
Restore the state of some models to before the current state.
Declaration
public void Undo()
UpdateTypeId(Nullable<Guid>)
Update TypeId for composition elements.
Declaration
public void UpdateTypeId(Nullable<Guid> id = null)
Parameters
Type | Name | Description |
---|---|---|
Nullable<Guid> | id | New value for TypeId. Can be null. |
Events
Changed
The composite element diagram change event.
Declaration
public event Action Changed
Event Type
Type | Description |
---|---|
Action |
ElementAdded
Child element added.
Declaration
public event Action<DiagramElement> ElementAdded
Event Type
Type | Description |
---|---|
Action<DiagramElement> |
ElementRemoved
Child element removed.
Declaration
public event Action<DiagramElement> ElementRemoved
Event Type
Type | Description |
---|---|
Action<DiagramElement> |
StrategyChanged
Raised when strategy changed.
Declaration
public event Action StrategyChanged
Event Type
Type | Description |
---|---|
Action |