public async void BeaconEngine_Stopped(BluetoothLEAdvertisementWatcherStatus status)
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
         ShowMessageDialog("Beacon Engine Stopped : " + status);
     });
 }
 public void Map_ForStatus_ReturnsWatcherStatus(
     BluetoothLEAdvertisementWatcherStatus bluetoothStatus,
     Status status)
 {
     CreateSut().Map(bluetoothStatus)
     .Should()
     .Be(status);
 }
示例#3
0
 public Status Map(BluetoothLEAdvertisementWatcherStatus status)
 {
     return(status switch
     {
         BluetoothLEAdvertisementWatcherStatus.Started => Status.Started,
         BluetoothLEAdvertisementWatcherStatus.Aborted => Status.Aborted,
         BluetoothLEAdvertisementWatcherStatus.Created => Status.Created,
         BluetoothLEAdvertisementWatcherStatus.Stopped => Status.Stopped,
         BluetoothLEAdvertisementWatcherStatus.Stopping => Status.Stopping,
         _ => throw new ArgumentException($"Unknown status: '{status}'!")
     });