Пример #1
0
 public virtual List <Port> GetCompatiblePorts(Port startPort, NodeAdapter nodeAdapter)
 {
     return(ports.ToList().Where(nap =>
                                 nap.direction != startPort.direction &&
                                 nap.node != startPort.node &&
                                 nodeAdapter.GetAdapter(nap.source, startPort.source) != null)
            .ToList());
 }
Пример #2
0
 public virtual List <PortPresenter> GetCompatiblePorts(PortPresenter startPort, NodeAdapter nodeAdapter)
 {
     return((from nap in this.allChildren.OfType <PortPresenter>()
             where nap.IsConnectable() && nap.orientation == startPort.orientation && nap.direction != startPort.direction && nodeAdapter.GetAdapter(nap.source, startPort.source) != null
             select nap).ToList <PortPresenter>());
 }