Class CompositionHelper
- Namespace
- StockSharp.Diagram
- Assembly
- StockSharp.Diagram.Core.dll
Helpers.
public static class CompositionHelper
- Inheritance
-
CompositionHelper
- Inherited Members
Methods
AddDiagramElement(Type)
Add DiagramElement type.
public static void AddDiagramElement(Type elemType)
Parameters
elemTypeTypeDiagramElement type.
AddDiagramElement<T>()
Add DiagramElement type.
public static void AddDiagramElement<T>() where T : DiagramElement
Type Parameters
TDiagramElement type.
BreakOnly(IEnumerable<DiagramSocket>)
Filter the specified sockets by the IsBreak.
public static IEnumerable<DiagramSocket> BreakOnly(this IEnumerable<DiagramSocket> sockets)
Parameters
socketsIEnumerable<DiagramSocket>All sockets.
Returns
- IEnumerable<DiagramSocket>
Break sockets.
ContinueAndWaitOnNext(DebuggerSyncObject)
To continue and stop at the next element.
public static void ContinueAndWaitOnNext(this DebuggerSyncObject syncObject)
Parameters
syncObjectDebuggerSyncObject
FillDefault(ICompositionRegistry)
Fill DiagramElements by GetDiagramElements().
public static void FillDefault(this ICompositionRegistry registry)
Parameters
registryICompositionRegistry
FindAllElements(CompositionDiagramElement)
Find all non CompositionDiagramElement elements.
public static IEnumerable<DiagramElement> FindAllElements(this CompositionDiagramElement composition)
Parameters
compositionCompositionDiagramElement
Returns
FindAllElements<T>(CompositionDiagramElement)
Find all non CompositionDiagramElement elements.
public static IEnumerable<T> FindAllElements<T>(this CompositionDiagramElement composition) where T : DiagramElement
Parameters
compositionCompositionDiagramElement
Returns
- IEnumerable<T>
Type Parameters
T
FindById(IEnumerable<DiagramSocket>, string)
public static DiagramSocket FindById(this IEnumerable<DiagramSocket> sockets, string id)
Parameters
socketsIEnumerable<DiagramSocket>idstring
Returns
GetAllElementsSockets(CompositionDiagramElement)
Get all sockets from the specified CompositionDiagramElement.
public static IEnumerable<DiagramSocket> GetAllElementsSockets(this CompositionDiagramElement composition)
Parameters
compositionCompositionDiagramElement
Returns
- IEnumerable<DiagramSocket>
All sockets.
GetAllSockets(DiagramElement)
Get all sockets from the specified DiagramElement.
public static IEnumerable<DiagramSocket> GetAllSockets(this DiagramElement element)
Parameters
elementDiagramElement
Returns
- IEnumerable<DiagramSocket>
All sockets.
GetDiagramElements()
Get all diagram elements.
public static IEnumerable<DiagramElement> GetDiagramElements()
Returns
- IEnumerable<DiagramElement>
All diagram elements.
GetFromSocket<TNode, TLink>(ICompositionModelLink, ICompositionModelBehavior<TNode, TLink>)
Get From socket for the specified link.
public static DiagramSocket GetFromSocket<TNode, TLink>(this ICompositionModelLink link, ICompositionModelBehavior<TNode, TLink> behavior) where TNode : ICompositionModelNode where TLink : ICompositionModelLink
Parameters
linkICompositionModelLinkbehaviorICompositionModelBehavior<TNode, TLink>
Returns
Type Parameters
TNodeTLink
GetToSocket<TNode, TLink>(ICompositionModelLink, ICompositionModelBehavior<TNode, TLink>)
Get To socket for the specified link.
public static DiagramSocket GetToSocket<TNode, TLink>(this ICompositionModelLink link, ICompositionModelBehavior<TNode, TLink> behavior) where TNode : ICompositionModelNode where TLink : ICompositionModelLink
Parameters
linkICompositionModelLinkbehaviorICompositionModelBehavior<TNode, TLink>
Returns
Type Parameters
TNodeTLink
HasCode(CompositionDiagramElement)
Check the specified CompositionDiagramElement contains code element.
public static bool HasCode(this CompositionDiagramElement composition)
Parameters
compositionCompositionDiagramElement
Returns
- bool
Check result.
HasCode(DiagramStrategy)
Check the specified DiagramStrategy contains code element.
public static bool HasCode(this DiagramStrategy strategy)
Parameters
strategyDiagramStrategy
Returns
- bool
Check result.
IsEditable(DiagramSocketType)
public static bool IsEditable(this DiagramSocketType type)
Parameters
typeDiagramSocketType
Returns
IsFinal(DiagramSocketValue)
Determine the specified value is final.
public static bool? IsFinal(this DiagramSocketValue value)
Parameters
Returns
- bool?
Operation result.
SelectedOnly(IEnumerable<DiagramSocket>)
Filter the specified sockets by the IsSelected.
public static IEnumerable<DiagramSocket> SelectedOnly(this IEnumerable<DiagramSocket> sockets)
Parameters
socketsIEnumerable<DiagramSocket>All sockets.
Returns
- IEnumerable<DiagramSocket>
Selected sockets.
ToDiagramType(Type)
Find the DiagramSocketType by the specified Type.
public static DiagramSocketType ToDiagramType(this Type type)
Parameters
typeTypeType.
Returns
TryGetElementById(CompositionDiagramElement, Guid, out DiagramElement)
Find the element by the specified identifier.
public static bool TryGetElementById(this CompositionDiagramElement composition, Guid elementId, out DiagramElement element)
Parameters
compositionCompositionDiagramElementelementIdGuidDiagramElement identifier.
elementDiagramElementFound DiagramElement.
Returns
- bool
Operation result.
TryGetSocketById(CompositionDiagramElement, Guid, string, out DiagramSocket)
Find the socket by the specified identifiers.
public static bool TryGetSocketById(this CompositionDiagramElement composition, Guid elementId, string socketId, out DiagramSocket socket)
Parameters
compositionCompositionDiagramElementelementIdGuidDiagramElement identifier.
socketIdstringDiagramSocket identifier.
socketDiagramSocketFound socket.
Returns
- bool
Operation result.