Ejemplo n.º 1
0
 public void Open(string portName, int baudRate)
 {
     if (IsOpen)
     {
         throw new InvalidOperationException();
     }
     else
     {
         _selectedInterface = _interfaces.SingleOrDefault(p => p.PortNames.Contains(portName)) ?? _selectedInterface;
         _selectedInterface.Open(portName, baudRate);
         ConnectionEstablished?.Invoke(this);
     }
 }