CompositionHelper
Helpers.
Methods
public static void AddDiagramElement(Type elemType)
CompositionHelper.AddDiagramElement(elemType)
Add DiagramElement type.
- elemType
- DiagramElement type.
public static void AddDiagramElement<T>()
CompositionHelper.AddDiagramElement()
Add DiagramElement type.
public static IEnumerable<DiagramSocket> BreakOnly(IEnumerable<DiagramSocket> sockets)
result = CompositionHelper.BreakOnly(sockets)
Filter the specified by the IsBreak.
- sockets
- All sockets.
Returns: Break sockets.
public static void ContinueAndWaitOnNext(DebuggerSyncObject syncObject)
CompositionHelper.ContinueAndWaitOnNext(syncObject)
To continue and stop at the next element.
- syncObject
- DebuggerSyncObject
public static void FillDefault(ICompositionRegistry registry)
CompositionHelper.FillDefault(registry)
Fill DiagramElements by GetDiagramElements.
- registry
- ICompositionRegistry.
public static IEnumerable<DiagramElement> FindAllElements(CompositionDiagramElement composition)
result = CompositionHelper.FindAllElements(composition)
Find all non CompositionDiagramElement elements.
public static IEnumerable<T> FindAllElements<T>(CompositionDiagramElement composition)
result = CompositionHelper.FindAllElements(composition)
Find all non CompositionDiagramElement elements.
public static DiagramSocket FindById(IEnumerable<DiagramSocket> sockets, string id)
result = CompositionHelper.FindById(sockets, id)
- sockets
- id
public static IEnumerable<DiagramSocket> GetAllElementsSockets(CompositionDiagramElement composition)
result = CompositionHelper.GetAllElementsSockets(composition)
Get all sockets from the specified CompositionDiagramElement.
- composition
- CompositionDiagramElement
Returns: All sockets.
public static IEnumerable<DiagramSocket> GetAllSockets(DiagramElement element)
result = CompositionHelper.GetAllSockets(element)
Get all sockets from the specified DiagramElement.
- element
- DiagramElement
Returns: All sockets.
public static IEnumerable<DiagramElement> GetDiagramElements()
result = CompositionHelper.GetDiagramElements()
Get all diagram elements.
Returns: All diagram elements.
public static DiagramSocket GetFromSocket<TNode, TLink>(ICompositionModelLink link, ICompositionModelBehavior<TNode, TLink> behavior)
result = CompositionHelper.GetFromSocket(link, behavior)
Get From socket for the specified link.
- link
- ICompositionModelLink
- behavior
- ICompositionModelBehavior
Returns: DiagramSocket
public static DiagramSocket GetToSocket<TNode, TLink>(ICompositionModelLink link, ICompositionModelBehavior<TNode, TLink> behavior)
result = CompositionHelper.GetToSocket(link, behavior)
Get To socket for the specified link.
- link
- ICompositionModelLink
- behavior
- ICompositionModelBehavior
Returns: DiagramSocket
public static bool HasCode(CompositionDiagramElement composition)
result = CompositionHelper.HasCode(composition)
Check the specified CompositionDiagramElement contains code element.
- composition
- CompositionDiagramElement
Returns: Check result.
public static bool HasCode(DiagramStrategy strategy)
result = CompositionHelper.HasCode(strategy)
Check the specified DiagramStrategy contains code element.
- strategy
- DiagramStrategy
Returns: Check result.
public static bool IsEditable(DiagramSocketType type)
result = CompositionHelper.IsEditable(type)
- type
public static bool? IsFinal(DiagramSocketValue value)
result = CompositionHelper.IsFinal(value)
Determine the specified value is final.
- value
- DiagramSocketValue
Returns: Operation result.
public static IEnumerable<DiagramSocket> SelectedOnly(IEnumerable<DiagramSocket> sockets)
result = CompositionHelper.SelectedOnly(sockets)
Filter the specified by the IsSelected.
- sockets
- All sockets.
Returns: Selected sockets.
public static DiagramSocketType ToDiagramType(Type type)
result = CompositionHelper.ToDiagramType(type)
Find the DiagramSocketType by the specified Type.
- type
- Type.
Returns: DiagramSocketType
public static bool TryGetElementById(CompositionDiagramElement composition, Guid elementId, DiagramElement element)
result = CompositionHelper.TryGetElementById(composition, elementId, element)
Find the element by the specified identifier.
- composition
- CompositionDiagramElement
- elementId
- DiagramElement identifier.
- element
- Found DiagramElement.
Returns: Operation result.
public static bool TryGetSocketById(CompositionDiagramElement composition, Guid elementId, string socketId, DiagramSocket socket)
result = CompositionHelper.TryGetSocketById(composition, elementId, socketId, socket)
Find the socket by the specified identifiers.
- composition
- CompositionDiagramElement
- elementId
- DiagramElement identifier.
- socketId
- DiagramSocket identifier.
- socket
- Found socket.
Returns: Operation result.