Exemplo n.º 1
0
 public GraphPort(string name, object instance, PortInfo info)
 {
     this.instance = instance;
     this.info     = info;
     this.id       = port.id;
     this.name     = name;
     if (info.direction.IsInput())
     {
         this.direction = PortDirections.Output;
     }
     else
     {
         this.direction = PortDirections.Input;
     }
 }
Exemplo n.º 2
0
 public Port GetPort(Guid portId)
 {
     if (portInfos.ContainsKey(portId))
     {
         PortInfo info = portInfos[portId];
         Port     port = info.Get(this);
         port.name      = info.name;
         port.direction = info.direction;
         //Debug.LogFormat("Port {0}.{1} has {2} | {3}", GetType().Name, port.name, port.direction, port.style);
         return(port);
     }
     if (dynamicPorts.ContainsKey(portId))
     {
         return(dynamicPorts[portId]);
     }
     return(null);
 }