private async void LoadPin() { Dispatcher.InvokeAsync(() => { TxtPin.Visibility = Visibility.Visible; PinError.Visibility = Visibility.Collapsed; }); StopPinTimer(); TxtPin.Text = string.Empty; try { _pinResult = await _connectionManager.CreatePin().ConfigureAwait(false); Dispatcher.InvokeAsync(() => TxtPin.Text = _pinResult.Pin); StartPinTimer(); } catch (Exception) { OnPinError(); } }
public async Task ExchangePin(PinCreationResult pin) { var result = await _connectService.ExchangePin(pin); var credentials = await _credentialProvider.GetServerCredentials().ConfigureAwait(false); credentials.ConnectAccessToken = result.AccessToken; credentials.ConnectUserId = result.UserId; await EnsureConnectUser(credentials, CancellationToken.None).ConfigureAwait(false); await _credentialProvider.SaveServerCredentials(credentials).ConfigureAwait(false); }
public Task<PinStatusResult> GetPinStatus(PinCreationResult pin) { return _connectService.GetPinStatus(pin); }