Пример #1
0
 internal Peripheral(int id, string name, bool online)
 {
     if (name == null)
     {
         throw new ArgumentException("A device must have a name", nameof(name));
     }
     _peripheral = new HostJsonApiObjectFactory.ApiPeripheral {
         id = id, name = name, online = online
     };
 }
Пример #2
0
 internal Peripheral(HostJsonApiObjectFactory.ApiPeripheral peripheral)
 {
     _peripheral = peripheral ?? throw new ArgumentException("Peripheral cannot be null.", nameof(peripheral));
 }