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