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
elemType
TypeDiagramElement type.
AddDiagramElement<T>()
Add DiagramElement type.
public static void AddDiagramElement<T>() where T : DiagramElement
Type Parameters
T
DiagramElement type.
BreakOnly(IEnumerable<DiagramSocket>)
Filter the specified sockets
by the IsBreak.
public static IEnumerable<DiagramSocket> BreakOnly(this IEnumerable<DiagramSocket> sockets)
Parameters
sockets
IEnumerable<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
syncObject
DebuggerSyncObject
FillDefault(ICompositionRegistry)
Fill DiagramElements by GetDiagramElements().
public static void FillDefault(this ICompositionRegistry registry)
Parameters
registry
ICompositionRegistry
FindAllElements(CompositionDiagramElement)
Find all non CompositionDiagramElement elements.
public static IEnumerable<DiagramElement> FindAllElements(this CompositionDiagramElement composition)
Parameters
composition
CompositionDiagramElement
Returns
FindAllElements<T>(CompositionDiagramElement)
Find all non CompositionDiagramElement elements.
public static IEnumerable<T> FindAllElements<T>(this CompositionDiagramElement composition) where T : DiagramElement
Parameters
composition
CompositionDiagramElement
Returns
- IEnumerable<T>
Type Parameters
T
FindById(IEnumerable<DiagramSocket>, string)
public static DiagramSocket FindById(this IEnumerable<DiagramSocket> sockets, string id)
Parameters
sockets
IEnumerable<DiagramSocket>id
string
Returns
GetAllElementsSockets(CompositionDiagramElement)
Get all sockets from the specified CompositionDiagramElement.
public static IEnumerable<DiagramSocket> GetAllElementsSockets(this CompositionDiagramElement composition)
Parameters
composition
CompositionDiagramElement
Returns
- IEnumerable<DiagramSocket>
All sockets.
GetAllSockets(DiagramElement)
Get all sockets from the specified DiagramElement.
public static IEnumerable<DiagramSocket> GetAllSockets(this DiagramElement element)
Parameters
element
DiagramElement
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
link
ICompositionModelLinkbehavior
ICompositionModelBehavior<TNode, TLink>
Returns
Type Parameters
TNode
TLink
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
link
ICompositionModelLinkbehavior
ICompositionModelBehavior<TNode, TLink>
Returns
Type Parameters
TNode
TLink
HasCode(CompositionDiagramElement)
Check the specified CompositionDiagramElement contains code element.
public static bool HasCode(this CompositionDiagramElement composition)
Parameters
composition
CompositionDiagramElement
Returns
- bool
Check result.
HasCode(DiagramStrategy)
Check the specified DiagramStrategy contains code element.
public static bool HasCode(this DiagramStrategy strategy)
Parameters
strategy
DiagramStrategy
Returns
- bool
Check result.
IsEditable(DiagramSocketType)
public static bool IsEditable(this DiagramSocketType type)
Parameters
type
DiagramSocketType
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
sockets
IEnumerable<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
type
TypeType.
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
composition
CompositionDiagramElementelementId
GuidDiagramElement identifier.
element
DiagramElementFound 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
composition
CompositionDiagramElementelementId
GuidDiagramElement identifier.
socketId
stringDiagramSocket identifier.
socket
DiagramSocketFound socket.
Returns
- bool
Operation result.