DiagramSocket
Connection.
Inherits: Disposable
Implements: INotifyPropertyChanged
Constructors
public DiagramSocket(DiagramSocketDirection dir, string socketId)
diagramSocket = DiagramSocket(dir, socketId)
Initializes a new instance of the DiagramSocket.
Properties
public Action<DiagramSocketValue> Action { get; set; }
value = diagramSocket.Action
diagramSocket.Action = value
Socket action.
public IList<DiagramSocketType> AvailableTypes { get; private set; }
value = diagramSocket.AvailableTypes
diagramSocket.AvailableTypes = value
Available input data types.
public DiagramSocketDirection Direction { get; }
value = diagramSocket.Direction
The connection direction.
public INotifyPropertyChanged GuiWrapper { get; }
value = diagramSocket.GuiWrapper
Gui wrapper for property binding.
public string Id { get; protected set; }
value = diagramSocket.Id
diagramSocket.Id = value
The connection identifier.
public bool IsBreak { get; set; }
value = diagramSocket.IsBreak
diagramSocket.IsBreak = value
Is socket has break.
public bool IsBreakActive { get; set; }
value = diagramSocket.IsBreakActive
diagramSocket.IsBreakActive = value
Is socket break active.
public bool IsConnected { get; }
value = diagramSocket.IsConnected
Is socket has connections.
public bool IsDynamic { get; set; }
value = diagramSocket.IsDynamic
diagramSocket.IsDynamic = value
Dynamic sockets are removed during Load().
public bool IsSelected { get; set; }
value = diagramSocket.IsSelected
diagramSocket.IsSelected = value
Is socket selected.
public int LinkableMaximum { get; set; }
value = diagramSocket.LinkableMaximum
diagramSocket.LinkableMaximum = value
The maximum number of connections.
public string Name { get; set; }
value = diagramSocket.Name
diagramSocket.Name = value
The connection name.
public DiagramElement Parent { get; set; }
value = diagramSocket.Parent
diagramSocket.Parent = value
The socket parent element.
public DiagramSocketType Type { get; set; }
value = diagramSocket.Type
diagramSocket.Type = value
Connection type.
public object Value { get; set; }
value = diagramSocket.Value
diagramSocket.Value = value
The current value.
Methods
public bool CanConnect(DiagramSocket to)
result = diagramSocket.CanConnect(to)
To check the ability to make a connection.
- to
- Connection.
Returns: The test result.
public virtual bool CanConnectFrom(DiagramSocket from)
result = diagramSocket.CanConnectFrom(from)
To check the ability to make a connection.
- from
- Connection.
Returns: The test result.
public void Connect(DiagramSocket other)
diagramSocket.Connect(other)
Invoke Connected event.
- other
- DiagramSocket
public void Disconnect(DiagramSocket other)
diagramSocket.Disconnect(other)
Invoke Connected event.
- other
- DiagramSocket
protected override void DisposeManaged()
diagramSocket.DisposeManaged()
Release resources.
private void OnPropertyChanged(string propertyName)
diagramSocket.OnPropertyChanged(propertyName)
To call the connection property value change event.
- propertyName
- Property name.
public override string ToString()
result = diagramSocket.ToString()
Преобразовать к строковому представлению.
Returns: Строковое представление.
Events
public event Func<DiagramSocket, bool> CanConnectEx
diagramSocket.CanConnectEx += handler
Extra validation for the ability to make a connection.
public event Action<DiagramSocket, DiagramSocket> Connected
diagramSocket.Connected += handler
The event of the socket connection with another one.
public event Action<DiagramSocket, DiagramSocket> Disconnected
diagramSocket.Disconnected += handler
The socket disconnection event.
public event PropertyChangedEventHandler PropertyChanged
diagramSocket.PropertyChanged += handler
The connection properties value change event.