public override void Execute() { //check connection first if (!_device.CheckConnection()) { _device.Connect(); } _device.TurnOn(); }
public override void Execute() { //check connection first if (!_device.CheckConnection()) { _device.Connect(); } //check status if (!_device.CheckStatus()) { return; } _device.TurnOff(); }