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 }; }
internal Peripheral(HostJsonApiObjectFactory.ApiPeripheral peripheral) { _peripheral = peripheral ?? throw new ArgumentException("Peripheral cannot be null.", nameof(peripheral)); }