Table of Contents

Class DiagramSocket

Namespace
StockSharp.Diagram
Assembly
StockSharp.Diagram.Core.dll

Connection.

public class DiagramSocket : Disposable, INotifyPropertyChanged
Inheritance
DiagramSocket
Implements
Extension Methods

Constructors

DiagramSocket(DiagramSocketDirection, string)

Initializes a new instance of the DiagramSocket.

public DiagramSocket(DiagramSocketDirection dir, string socketId = null)

Parameters

dir DiagramSocketDirection
socketId string

Properties

Action

Socket action.

public Action<DiagramSocketValue> Action { get; set; }

Property Value

Action<DiagramSocketValue>

AvailableTypes

Available input data types.

public IList<DiagramSocketType> AvailableTypes { get; }

Property Value

IList<DiagramSocketType>

Directon

The connection direction.

public DiagramSocketDirection Directon { get; }

Property Value

DiagramSocketDirection

GuiWrapper

Gui wrapper for property binding.

public INotifyPropertyChanged GuiWrapper { get; }

Property Value

INotifyPropertyChanged

Id

The connection identifier.

public string Id { get; protected set; }

Property Value

string

IsBreak

Is socket has break.

public bool IsBreak { get; set; }

Property Value

bool

IsBreakActive

Is socket break active.

public bool IsBreakActive { get; set; }

Property Value

bool

IsConnected

Is socket has connections.

public bool IsConnected { get; }

Property Value

bool

IsDynamic

Dynamic sockets are removed during Load().

public bool IsDynamic { get; set; }

Property Value

bool

IsInput

Is input.

public bool IsInput { get; }

Property Value

bool

IsOutput

Is output.

public bool IsOutput { get; }

Property Value

bool

IsSelected

Is socket selected.

public bool IsSelected { get; set; }

Property Value

bool

LinkableMaximum

The maximum number of connections.

public int LinkableMaximum { get; set; }

Property Value

int

Name

The connection name.

public string Name { get; set; }

Property Value

string

Parent

The socket parent element.

public DiagramElement Parent { get; set; }

Property Value

DiagramElement

Type

Connection type.

public DiagramSocketType Type { get; set; }

Property Value

DiagramSocketType

Value

The current value.

public object Value { get; set; }

Property Value

object

Methods

CanConnect(DiagramSocket)

To check the ability to make a connection.

public bool CanConnect(DiagramSocket to)

Parameters

to DiagramSocket

Connection.

Returns

bool

The test result.

CanConnectFrom(DiagramSocket)

To check the ability to make a connection.

public virtual bool CanConnectFrom(DiagramSocket from)

Parameters

from DiagramSocket

Connection.

Returns

bool

The test result.

Connect(DiagramSocket)

Invoke Connected event.

public void Connect(DiagramSocket other)

Parameters

other DiagramSocket

DiagramSocket

Disconnect(DiagramSocket)

Invoke Connected event.

public void Disconnect(DiagramSocket other)

Parameters

other DiagramSocket

DiagramSocket

DisposeManaged()

protected override void DisposeManaged()

OnPropertyChanged(string)

To call the connection property value change event.

protected virtual void OnPropertyChanged(string propertyName)

Parameters

propertyName string

Property name.

ToString()

public override string ToString()

Returns

string

Events

Connected

The event of the socket connection with another one.

public event Action<DiagramSocket, DiagramSocket> Connected

Event Type

Action<DiagramSocket, DiagramSocket>

Disconnected

The socket disconnection event.

public event Action<DiagramSocket, DiagramSocket> Disconnected

Event Type

Action<DiagramSocket, DiagramSocket>

PropertyChanged

The connection properties value change event.

public event PropertyChangedEventHandler PropertyChanged

Event Type

PropertyChangedEventHandler