Beispiel #1
0
 public void Connect(IGPIOReceiver destination, int destinationNumber)
 {
     if (destination == null)
     {
         throw new ArgumentNullException("destination");
     }
     Validate(destination, destinationNumber);
     lock (sync)
     {
         target       = destination;
         targetNumber = destinationNumber;
         target.OnGPIO(destinationNumber, state);
     }
 }
Beispiel #2
0
 public void Connect(IGPIOReceiver destination, int destinationNumber)
 {
     if(destination == null)
     {
         throw new ArgumentNullException("destination");
     }
     Validate(destination, destinationNumber);
     lock(sync)
     {
         target = destination;
         targetNumber = destinationNumber;
         target.OnGPIO(destinationNumber, state);
     }
 }
Beispiel #3
0
 public void Connect(IGPIOReceiver destination, int destinationNumber)
 {
     if (destination == null)
     {
         throw new ArgumentNullException("destination");
     }
     Validate(destination, destinationNumber);
     lock (sync)
     {
         if (!targets.Any(x => x.Receiver == destination && x.Number == destinationNumber))
         {
             targets.Add(new GPIOEndpoint(destination, destinationNumber));
             destination.OnGPIO(destinationNumber, state);
         }
     }
 }