Table of Contents

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 Type

DiagramElement 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

DebuggerSyncObject

FillDefault(ICompositionRegistry)

public static void FillDefault(this ICompositionRegistry registry)

Parameters

registry ICompositionRegistry

ICompositionRegistry.

FindAllElements(CompositionDiagramElement)

Find all non CompositionDiagramElement elements.

public static IEnumerable<DiagramElement> FindAllElements(this CompositionDiagramElement composition)

Parameters

composition CompositionDiagramElement

Returns

IEnumerable<DiagramElement>

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

DiagramSocket

GetAllElementsSockets(CompositionDiagramElement)

Get all sockets from the specified CompositionDiagramElement.

public static IEnumerable<DiagramSocket> GetAllElementsSockets(this CompositionDiagramElement composition)

Parameters

composition CompositionDiagramElement

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

DiagramElement

Returns

IEnumerable<DiagramSocket>

All sockets.

GetDiagramElements()

Get all diagram elements.

public static IEnumerable<DiagramElement> GetDiagramElements()

Returns

IEnumerable<DiagramElement>

All diagram elements.

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 ICompositionModelLink

ICompositionModelLink

behavior ICompositionModelBehavior<TNode, TLink>

ICompositionModelBehavior<TNode, TLink>

Returns

DiagramSocket

DiagramSocket

Type Parameters

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 ICompositionModelLink

ICompositionModelLink

behavior ICompositionModelBehavior<TNode, TLink>

ICompositionModelBehavior<TNode, TLink>

Returns

DiagramSocket

DiagramSocket

Type Parameters

TNode
TLink

HasCode(CompositionDiagramElement)

Check the specified CompositionDiagramElement contains code element.

public static bool HasCode(this CompositionDiagramElement composition)

Parameters

composition CompositionDiagramElement

CompositionDiagramElement

Returns

bool

Check result.

HasCode(DiagramStrategy)

Check the specified DiagramStrategy contains code element.

public static bool HasCode(this DiagramStrategy strategy)

Parameters

strategy DiagramStrategy

DiagramStrategy

Returns

bool

Check result.

IsEditable(DiagramSocketType)

public static bool IsEditable(this DiagramSocketType type)

Parameters

type DiagramSocketType

Returns

bool

IsFinal(DiagramSocketValue)

Determine the specified value is final.

public static bool? IsFinal(this DiagramSocketValue value)

Parameters

value DiagramSocketValue

DiagramSocketValue

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 Type

Type.

Returns

DiagramSocketType

DiagramSocketType

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 CompositionDiagramElement

CompositionDiagramElement

elementId Guid

DiagramElement identifier.

element DiagramElement

Found 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 CompositionDiagramElement

CompositionDiagramElement

elementId Guid

DiagramElement identifier.

socketId string

DiagramSocket identifier.

socket DiagramSocket

Found socket.

Returns

bool

Operation result.