protected override async Task DoExecuteAsync() { var result = await Characteristic.WriteValueAsync(Bytes.AsBuffer(), WithoutResponse?GattWriteOption.WriteWithoutResponse : GattWriteOption.WriteWithResponse) .AsTask().ConfigureAwait(false); if (result == GattCommunicationStatus.Unreachable) { Status = CommandStatus.Unreachable; } }
protected override async Task DoExecuteAsync() { var result = await WindowsRuntimeSystemExtensions.AsTask(Characteristic.WriteValueAsync(Bytes.AsBuffer(), WithoutResponse ? GattWriteOption.WriteWithoutResponse : GattWriteOption.WriteWithResponse)).ConfigureAwait(false); if (result == GattCommunicationStatus.Unreachable) { throw new DeviceUnreachableException(); } }