Stop() public method

public Stop ( ) : void
return void
Beispiel #1
0
 public void Stop()
 {
     if (_query != null)
     {
         _query = null;
     }
     if (_onboardingProducer != null)
     {
         _onboardingProducer.Stop();
         _onboardingProducer = null;
     }
     if (_iconProducer != null)
     {
         _iconProducer.Stop();
         _iconProducer = null;
     }
     if (_busAttachment != null)
     {
         _busAttachment = null;
     }
     if (_softAccessPoint != null)
     {
         _softAccessPoint.Stop();
         _softAccessPoint = null;
     }
     if (_deviceWatcher != null)
     {
         _deviceWatcher.Stop();
         _deviceWatcher = null;
     }
     _wlanAdapterId = null;
     _state         = OnboardingState.NotConfigured;
 }
Beispiel #2
0
 public void Stop()
 {
     if (_onboardingProducer != null)
     {
         _onboardingProducer.Stop();
     }
     if (_iconProducer != null)
     {
         _iconProducer.Stop();
     }
     if (_softAccessPoint != null)
     {
         _softAccessPoint.Stop();
     }
     if (_deviceWatcher != null)
     {
         _deviceWatcher.Stop();
     }
 }
Beispiel #3
0
 public IAsyncOperation <OnboardingConnectResult> ConnectAsync(AllJoynMessageInfo info)
 {
     return(Task.Run(() =>
     {
         // Find the network with the specified Ssid
         foreach (var network in _wlanAdapter.NetworkReport.AvailableNetworks)
         {
             if (network.Ssid == _personalApSsid)
             {
                 _softAccessPoint?.Stop();
                 this.ConnectToNetwork(network);
             }
         }
         return OnboardingConnectResult.CreateSuccessResult();
     }).AsAsyncOperation());
 }
Beispiel #4
0
 public IAsyncOperation <OnboardingConnectResult> ConnectAsync(AllJoynMessageInfo info)
 {
     return(Task.Run(async() =>
     {
         // Find the network with the specified Ssid
         var adapter = await WiFiAdapter.FromIdAsync(_wlanAdapterId);
         foreach (var network in adapter.NetworkReport.AvailableNetworks)
         {
             if (network.Ssid == _personalApSsid)
             {
                 var result = await this.ConnectToNetwork(adapter, network);
                 if (result == WiFiConnectionStatus.Success)
                 {
                     _softAccessPoint?.Stop();
                     return OnboardingConnectResult.CreateSuccessResult();
                 }
                 break;
             }
         }
         return OnboardingConnectResult.CreateFailureResult(1);
     }).AsAsyncOperation());
 }