public void OnDeviceAdded(DiscoveryManager manager, ConnectableDevice device)
 {
     App.MainDispatcher.RunAsync(CoreDispatcherPriority.High, () =>
     {
         if (App.ApplicationModel.DiscoverredDevices.All(x => x.Id != device.Id))
         {
             App.ApplicationModel.AddDevice(device);
         }
      });
 }
 public void OnDeviceUpdated(DiscoveryManager manager, ConnectableDevice device)
 {
     App.MainDispatcher.RunAsync(CoreDispatcherPriority.High, () =>
     {
         if (App.ApplicationModel.DiscoverredDevices.Contains(device))
         {
             App.ApplicationModel.DiscoverredDevices.Remove(device);
             App.ApplicationModel.DiscoverredDevices.Add(device);
             device.OnPropertyChanged("ServiceNames");
         }
     });
 }
 public void OnDiscoveryFailed(DiscoveryManager manager, ServiceCommandError error)
 {
     throw new NotImplementedException();
 }
 public void OnDeviceRemoved(DiscoveryManager manager, ConnectableDevice device)
 {
     throw new NotImplementedException();
 }
 public static void Init(IConnectableDeviceStore connectableDeviceStore)
 {
     instance = new DiscoveryManager(connectableDeviceStore);
 }
 public static void Init()
 {
     instance = new DiscoveryManager();
 }