예제 #1
0
파일: Write.cs 프로젝트: trocken2/Eco2
        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);
            }
        }
예제 #2
0
파일: Read.cs 프로젝트: trocken2/Eco2
 public Read(string serial, IBluetooth bluetooth)
 {
     this.serial = serial;
     thermostats = Thermostats.Read();
     accessor    = new PeripheralAccessor(bluetooth);
 }