Exemplo n.º 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;
 }
Exemplo n.º 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();
     }
 }
Exemplo n.º 3
0
        private void HandleAdapterRemoved(DeviceWatcher sender, DeviceInformationUpdate information)
        {
            if (!String.IsNullOrEmpty(_wlanAdapterId) && _wlanAdapterId == information.Id)
            {
                _softAccessPoint.Stop();
                _wlanAdapterId = null;

                _onboardingProducer?.Stop();
                _iconProducer?.Stop();
            }
        }
        public void ScenarioCleanup()
        {
            OnboardingService.ConnectRequestRecieved -= OnboardingService_ConnectRequestRecieved;

            if (m_producer != null)
            {
                m_producer.Stop();
                m_producer.Dispose();
            }

            if (m_busAttachment != null)
            {
                m_busAttachment.CredentialsRequested   -= AlljoynBusAttachment_CredentialsRequested;
                m_busAttachment.AuthenticationComplete -= AlljoynBusAttachment_AuthenticationComplete;
                m_busAttachment.StateChanged           -= AlljoynBusAttachment_StateChanged;
                m_busAttachment.Disconnect();
            }
        }