DiagramSocket

StockSharp.Diagram

Connection.

Inherits: Disposable

Implements: INotifyPropertyChanged

Constructors

DiagramSocket
public DiagramSocket(DiagramSocketDirection dir, string socketId)
diagramSocket = DiagramSocket(dir, socketId)

Initializes a new instance of the DiagramSocket.

Properties

Action
public Action<DiagramSocketValue> Action { get; set; }
value = diagramSocket.Action
diagramSocket.Action = value

Socket action.

AvailableTypes
public IList<DiagramSocketType> AvailableTypes { get; private set; }
value = diagramSocket.AvailableTypes
diagramSocket.AvailableTypes = value

Available input data types.

Direction
public DiagramSocketDirection Direction { get; }
value = diagramSocket.Direction

The connection direction.

GuiWrapper
public INotifyPropertyChanged GuiWrapper { get; }
value = diagramSocket.GuiWrapper

Gui wrapper for property binding.

Id
public string Id { get; protected set; }
value = diagramSocket.Id
diagramSocket.Id = value

The connection identifier.

IsBreak
public bool IsBreak { get; set; }
value = diagramSocket.IsBreak
diagramSocket.IsBreak = value

Is socket has break.

IsBreakActive
public bool IsBreakActive { get; set; }
value = diagramSocket.IsBreakActive
diagramSocket.IsBreakActive = value

Is socket break active.

IsConnected
public bool IsConnected { get; }
value = diagramSocket.IsConnected

Is socket has connections.

IsDynamic
public bool IsDynamic { get; set; }
value = diagramSocket.IsDynamic
diagramSocket.IsDynamic = value

Dynamic sockets are removed during Load().

IsInput
public bool IsInput { get; }
value = diagramSocket.IsInput

Is input.

IsOutput
public bool IsOutput { get; }
value = diagramSocket.IsOutput

Is output.

IsSelected
public bool IsSelected { get; set; }
value = diagramSocket.IsSelected
diagramSocket.IsSelected = value

Is socket selected.

LinkableMaximum
public int LinkableMaximum { get; set; }
value = diagramSocket.LinkableMaximum
diagramSocket.LinkableMaximum = value

The maximum number of connections.

Name
public string Name { get; set; }
value = diagramSocket.Name
diagramSocket.Name = value

The connection name.

Parent
public DiagramElement Parent { get; set; }
value = diagramSocket.Parent
diagramSocket.Parent = value

The socket parent element.

Type
public DiagramSocketType Type { get; set; }
value = diagramSocket.Type
diagramSocket.Type = value

Connection type.

Value
public object Value { get; set; }
value = diagramSocket.Value
diagramSocket.Value = value

The current value.

Methods

CanConnect
public bool CanConnect(DiagramSocket to)
result = diagramSocket.CanConnect(to)

To check the ability to make a connection.

to
Connection.

Returns: The test result.

CanConnectFrom
public virtual bool CanConnectFrom(DiagramSocket from)
result = diagramSocket.CanConnectFrom(from)

To check the ability to make a connection.

from
Connection.

Returns: The test result.

Connect
public void Connect(DiagramSocket other)
diagramSocket.Connect(other)

Invoke Connected event.

other
DiagramSocket
Disconnect
public void Disconnect(DiagramSocket other)
diagramSocket.Disconnect(other)

Invoke Connected event.

other
DiagramSocket
DisposeManaged
protected override void DisposeManaged()
diagramSocket.DisposeManaged()

Release resources.

OnPropertyChanged
private void OnPropertyChanged(string propertyName)
diagramSocket.OnPropertyChanged(propertyName)

To call the connection property value change event.

propertyName
Property name.
ToString
public override string ToString()
result = diagramSocket.ToString()

Преобразовать к строковому представлению.

Returns: Строковое представление.

Events

CanConnectEx
public event Func<DiagramSocket, bool> CanConnectEx
diagramSocket.CanConnectEx += handler

Extra validation for the ability to make a connection.

Connected
public event Action<DiagramSocket, DiagramSocket> Connected
diagramSocket.Connected += handler

The event of the socket connection with another one.

Disconnected
public event Action<DiagramSocket, DiagramSocket> Disconnected
diagramSocket.Disconnected += handler

The socket disconnection event.

PropertyChanged
public event PropertyChangedEventHandler PropertyChanged
diagramSocket.PropertyChanged += handler

The connection properties value change event.