示例#1
0
 private void ChangeJunctionStateByPin(OutputPin pin)
 {
     foreach (var p in inputPins)
     {
         p.State = pin;
     }
 }
示例#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);
        }