private void InitializeSwitchCommand() { switchcommand = new Command(() => { On = !On; if (On) { Relay.SwitchOn(); } else { Relay.SwitchOff(); } Lamps.First().On = On; }); }
private void InitializeSwitchCommand() { switchcommand = new Command(async () => { var lamp = await client.Request(SwitchLamp,new Lamp() { Id = 0 }); On = lamp.On; }); }