Ejemplo n.º 1
0
 public void AddParallelGroup(Direction direction, ParallelGroup group)
 {
     if (!_parallelGroups.ContainsKey(direction))
     {
         _parallelGroups.Add(direction, group);
     }
 }
Ejemplo n.º 2
0
        public bool IsConnectedToParallelGroupInDirection(ParallelGroup group, Direction direction)
        {
            if (IsConnectedToAParallelGroupInDirection(direction))
            {
                return(_parallelGroups[direction] == group);
            }

            return(false);
        }
Ejemplo n.º 3
0
        public Direction GetConnectionDirectionOfParallelGroup(ParallelGroup group)
        {
            foreach (var connectionPair in _parallelGroups)
            {
                if (connectionPair.Value == group)
                {
                    return(connectionPair.Key);
                }
            }

            return(Direction.None);
        }