Start() public method

public Start ( ) : void
return void
Ejemplo n.º 1
0
        private void HandleAdapterAdded(DeviceWatcher sender, DeviceInformation information)
        {
            if (String.IsNullOrEmpty(_wlanAdapterId))
            {
                _wlanAdapterId = information.Id;

                lock (_stateLock)
                {
                    if (_state != OnboardingState.ConfiguredValidated)
                    {
                        _softAccessPoint.Start();
                    }
                }
                _onboardingProducer?.Start();
                _iconProducer?.Start();
            }
        }
Ejemplo n.º 2
0
        private async void HandleAdapterAdded(DeviceWatcher sender, DeviceInformation information)
        {
            if (_wlanAdapterId == null)
            {
                _wlanAdapterId = information.Id;
                _wlanAdapter   = await WiFiAdapter.FromIdAsync(_wlanAdapterId);

                lock (_stateLock)
                {
                    if (_state != OnboardingState.ConfiguredValidated)
                    {
                        _softAccessPoint.Start();
                    }
                }
                _onboardingProducer.Start();
                _iconProducer.Start();
            }
        }
Ejemplo n.º 3
0
        public IAsyncOperation <OnboardingOffboardResult> OffboardAsync(AllJoynMessageInfo info)
        {
            return(Task.Run(() =>
            {
                lock (_stateLock)
                {
                    if (_state == OnboardingState.ConfiguredValidated || _state == OnboardingState.ConfiguredValidating)
                    {
                        _wlanAdapter.Disconnect();
                    }
                    _state = OnboardingState.NotConfigured;
                    _personalApSsid = null;
                    _personalApPassword = null;
                    _authType = AuthType.Any;

                    _softAccessPoint?.Start();
                }
                return OnboardingOffboardResult.CreateSuccessResult();
            }).AsAsyncOperation());
        }