예제 #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 ConnectFrom(OnePinOutput singleOutput)
 {
     this.connectingFrom = singleOutput.Pin1;
     return this;
 }
예제 #3
0
 public Mechanic ConnectFrom(OutputTerminal terminal)
 {
     this.connectingFrom = terminal;
     return this;
 }