Ejemplo n.º 1
0
 private void ChangeJunctionStateByPin(OutputPin pin)
 {
     foreach (var p in inputPins)
     {
         p.State = pin;
     }
 }
Ejemplo n.º 2
0
        public void Add(OutputPin pin)
        {
            if (pin == outputPin)
            {
                return;
            }

            if (outputPin != null)
            {
                throw new InvalidOperationException("Only one output pin is allowed per junction, and it has already been set.");
            }
            outputPin = pin;
            AddInternal(pin);
            ChangeJunctionStateByPin(pin);
        }