示例#1
0
        public void Connect()
        {
            if ((this.connectingFrom == null) || (this.connectingTo == null))
            {
                throw new NullReferenceException("Terminals not specified correctly.");
            }

            if (!this.connectingFrom.TerminalsTo.Contains(this.connectingTo))
            {
                this.connectingFrom.TerminalsTo.Add(this.connectingTo);
                this.connectingTo.TerminalsFrom.Add(this.connectingFrom);   
            }
            
            this.connectingTo = null;
            this.connectingFrom = null;
        }
示例#2
0
 public Mechanic ConnectTo(IOnePinInput singleInputComponent)
 {
     this.connectingTo = singleInputComponent.PinA;
     return this;
 }
示例#3
0
 public Mechanic ConnectTo(InputTerminal terminal)
 {
     this.connectingTo = terminal;
     return this;
 }