コード例 #1
0
        /// <inheritdoc />
        public async Task <OperationResult> Login()
        {
            if (!connectivity.IsConnected)
            {
                return(OperationResult.Failed(new NetworkConnectionException()));
            }

            try
            {
                await cloudBackupService.Login();
            } catch (BackupAuthenticationFailedException ex)
            {
                return(OperationResult.Failed(ex));
            }

            return(OperationResult.Succeeded());
        }
コード例 #2
0
ファイル: BackupManager.cs プロジェクト: maczamora/MoneyFox
        /// <inheritdoc />
        public async Task Login()
        {
            if (!connectivity.IsConnected)
            {
                throw new NetworkConnectionException();
            }

            try
            {
                await cloudBackupService.Login();
            }
            catch (BackupAuthenticationFailedException ex)
            {
                logManager.Error(ex, "Login Failed.");
                throw;
            }
            catch (MsalClientException ex)
            {
                logManager.Error(ex, "Login Failed.");
                throw;
            }
        }