public async Task <bool> RefreshAsync(IProgressDialog progressDialog) { APIResult fooAPIResult; progressDialog.Title = $"檢查與更新存取權杖"; bool fooRefreshTokenResult = await RefreshTokenHelper .CheckAndRefreshToken(dialogService, refreshTokenService, systemStatusService, appStatus); if (fooRefreshTokenResult == false) { return(false); } //progressDialog.Title = $"回報例外異常資料中"; //await exceptionRecordsService.ReadFromFileAsync(); //if (exceptionRecordsService.Items.Count > 0) //{ // List<ExceptionRecordRequestDTO> fooExceptionRecordRequestDTOList = new List<ExceptionRecordRequestDTO>(); // foreach (var item in exceptionRecordsService.Items) // { // ExceptionRecordRequestDTO fooExceptionRecordRequestDTO = new ExceptionRecordRequestDTO() // { // CallStack = item.CallStack, // DeviceModel = item.DeviceModel, // DeviceName = item.DeviceName, // ExceptionTime = item.ExceptionTime, // Message = item.Message, // OSType = item.OSType, // OSVersion = item.OSVersion, // User = new UserDTO() { Id = appStatus.SystemStatus.UserID }, // }; // fooExceptionRecordRequestDTOList.Add(fooExceptionRecordRequestDTO); // } // fooAPIResult = await exceptionRecordsService.PostAsync(fooExceptionRecordRequestDTOList); // if (fooAPIResult.Status != true) // { // await dialogService.DisplayAlertAsync("回報例外異常資料中 發生錯誤", fooAPIResult.Message, "確定"); // return false; // } //} //progressDialog.Title = $"更新系統最新狀態資料中"; //fooAPIResult = await systemEnvironmentsService.GetAsync(); //if (fooAPIResult.Status != true) //{ // await dialogService.DisplayAlertAsync("更新系統最新狀態資料中 發生錯誤", fooAPIResult.Message, "確定"); // return false; //} return(true); }
public async Task <bool> LogoutCleanAsync(IProgressDialog progressDialog) { APIResult fooAPIResult; progressDialog.Title = $"檢查與更新存取權杖"; bool fooRefreshTokenResult = await RefreshTokenHelper .CheckAndRefreshToken(dialogService, refreshTokenService, systemStatusService, appStatus); if (fooRefreshTokenResult == false) { return(false); } progressDialog.Title = $"回報例外異常資料中"; return(true); }
public async Task <bool> LogoutCleanAsync(IProgressDialog progressDialog) { APIResult fooAPIResult; progressDialog.Title = $"檢查與更新存取權杖"; bool fooRefreshTokenResult = await RefreshTokenHelper .CheckAndRefreshToken(dialogService, refreshTokenService, systemStatusService, appStatus); if (fooRefreshTokenResult == false) { return(false); } progressDialog.Title = $"回報例外異常資料中"; #region 傳例外異常 await appExceptionsService.ReadFromFileAsync(); if (appExceptionsService.Items.Count > 0) { await appExceptionsService.ReadFromFileAsync(); var fooResult = await exceptionRecordsService.PostAsync(appExceptionsService.Items); if (fooResult.Status == true) { exceptionRecordsService.Items.Clear(); await exceptionRecordsService.WriteToFileAsync(); } else { await dialogService.DisplayAlertAsync("回報例外異常資料中 發生錯誤", fooResult.Message, "確定"); return(false); } } #endregion return(true); }