public ConnectionInterface FindSameInterface(ConnectionInterfacePool anotherPool) { foreach (var connectionInterface in _connections) { if (anotherPool.FindConnectionInterface(connectionInterface) != null) { return(connectionInterface); } } return(null); }
public List <ConnectionInterface> FindSameInterfaces(ConnectionInterfacePool anotherPool) { List <ConnectionInterface> connectionInterfaces = new List <ConnectionInterface>(); foreach (var connectionInterface in _connections) { if (anotherPool.FindConnectionInterface(connectionInterface) != null) { connectionInterfaces.Add(connectionInterface); } } return(connectionInterfaces); }