Exemplo n.º 1
0
        public async void Execute()
        {
            await _scheduler.Schedule(async() =>
            {
                if (_vpnStatus != VpnStatus.Disconnected)
                {
                    await _vpnServiceManager.Disconnect(VpnError.NoneKeepEnabledKillSwitch);
                }

                _loginViewModel.OnSessionExpired();
                await _userAuth.LogoutAsync();
            });
        }
Exemplo n.º 2
0
        public async void Execute()
        {
            await _scheduler.Schedule(async() =>
            {
                if (_vpnStatus != VpnStatus.Disconnected)
                {
                    await _vpnServiceManager.Disconnect(VpnError.Unknown);
                }

                _loginViewModel.OnSessionExpired();
                _userAuth.Logout();
            });
        }
Exemplo n.º 3
0
        public void OnAppOutdated(object sender, BaseResponse e)
        {
            if (_notified)
            {
                return;
            }

            _notified = true;
            _scheduler.Schedule(() =>
            {
                if (_vpnStatus != VpnStatus.Disconnected)
                {
                    _vpnServiceManager.Disconnect(VpnError.Unknown);
                }

                _userAuth.Logout();
                _loginWindow.Hide();
                _modals.Show <OutdatedAppModalViewModel>();
            });
        }
Exemplo n.º 4
0
 public async Task Disconnect(VpnError vpnError = VpnError.None)
 {
     await Queued(() => _vpnServiceManager.Disconnect(vpnError));
 }
Exemplo n.º 5
0
 public async Task Disconnect()
 {
     await _vpnServiceManager.Disconnect(VpnError.NoneKeepEnabledKillSwitch);
 }
Exemplo n.º 6
0
 public async Task DisconnectAsync(VpnError vpnError = VpnError.None)
 {
     _vpnReconnector.OnDisconnectionRequest();
     await Enqueue(() => _vpnServiceManager.Disconnect(vpnError));
 }
Exemplo n.º 7
0
 public async Task Disconnect(VpnError error)
 {
     await InvokeAction(() => _decorated.Disconnect(error));
 }