public Write(string serial, IBluetooth bluetooth) { this.serial = serial; thermostats = Thermostats.Read(); accessor = new PeripheralAccessor(bluetooth); if (!thermostats.HasSecretAndUuidFor(serial)) { Console.Error.WriteLine($"Has not previously connected to {serial}. Do a read first."); Environment.Exit(1); } }
public Read(string serial, IBluetooth bluetooth) { this.serial = serial; thermostats = Thermostats.Read(); accessor = new PeripheralAccessor(bluetooth); }