Beispiel #1
0
 /// <summary>
 /// We can create Node only from same assembly
 /// </summary>
 /// <param name="name"></param>
 protected internal Node(string name, NodeType _nodeType)
 {
     Name              = name;
     PortManager       = new Main.Ports.PortManager(this);
     ConnectionManager = new Main.Connections.ConnectionManager();
     NodeType          = _nodeType;
 }
Beispiel #2
0
 /// <summary>
 /// Is port connected to some other port or ports
 /// </summary>
 public static bool Connected(Port port)
 {
     Main.Connections.ConnectionManager _curConnManager = port.Parent.ConnectionManager;
     if (!_curConnManager._connections.ContainsKey(port))
     {
         return(false);
     }
     return(_curConnManager._connections[port].Count != 0);
 }
Beispiel #3
0
 /// <summary>
 /// Return all connected ports
 /// </summary>
 public static List <Port> GetAllConnections(Port port)
 {
     Main.Connections.ConnectionManager _curConnManager = port.Parent.ConnectionManager;
     if (_curConnManager._connections.ContainsKey(port))
     {
         return(_curConnManager._connections[port]);
     }
     else
     {
         return(new List <Port>());
     }
 }