Ejemplo n.º 1
0
        async Task <byte[]> DoGetValue()
        {
            var result = await _descriptor.ReadValueAsync(Windows.Devices.Bluetooth.BluetoothCacheMode.Cached).AsTask().ConfigureAwait(false);

            if (result.Status == Uap.GattCommunicationStatus.Success)
            {
                return(result.Value.ToArray());
            }

            return(null);
        }
Ejemplo n.º 2
0
        byte[] PlatformGetValue()
        {
            var result = _descriptor.ReadValueAsync(Windows.Devices.Bluetooth.BluetoothCacheMode.Cached).GetResults();

            if (result.Status == Uap.GattCommunicationStatus.Success)
            {
                return(result.Value.ToArray());
            }

            return(null);
        }