protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.en_developer_tools); _viewModel = new ENDeveloperToolsViewModel(); InitLayout(); }
public async Task <bool> PostSelfExposureKeys(SelfDiagnosisSubmissionDTO selfDiagnosisSubmissionDTO, IEnumerable <ExposureKeyModel> temporaryExposureKeys, BaseWebService service) { ApiResponse response; if (AuthenticationState.PersonalData?.AnonymousTokensEnabled == true) { response = await PostSelfExposureKeysWithAnonTokens(selfDiagnosisSubmissionDTO, temporaryExposureKeys, service); } else { response = await service.Post(selfDiagnosisSubmissionDTO, Conf.URL_PUT_UPLOAD_DIAGNOSIS_KEYS); } // HandleErrorsSilently happens even if IsSuccessfull is true other places in the code, but here // we have an if-else to avoid having to create the redacted key list if we don't have to if (!response.IsSuccessfull) { string redactedKeysJson = RedactedTekListHelper.CreateRedactedTekList(temporaryExposureKeys); HandleErrorsSilently(response, new PostExposureKeysErrorHandler(redactedKeysJson)); } else { HandleErrorsSilently(response); } ENDeveloperToolsViewModel.UpdatePushKeysInfo(response, selfDiagnosisSubmissionDTO, JsonSerializerSettings); return(response.IsSuccessfull); }
private void PullKeys() { Task.Run(async() => { await DiagnosisKeysDataMappingUtils.SetDiagnosisKeysDataMappingAsync(); await _viewModel.PullKeysFromServer(); UpdateText($"{ENDeveloperToolsViewModel.GetLastPullResult()}"); }); }
async partial void ENDevPullKeysAndGetExposureInfo_TouchUpInside(UIButton sender) { await _enDeveloperViewModel.PullKeysFromServerAndGetExposureInfo(); ENDevOutput.Text = ENDeveloperToolsViewModel.GetLastPullResult(); }
public override void ViewDidLoad() { base.ViewDidLoad(); _enDeveloperViewModel = new ENDeveloperToolsViewModel(); _enDeveloperViewModel.DevToolUpdateOutput += updateUI; }
private async void PullKeysAndGetExposureInfo() { await _viewModel.PullKeysFromServerAndGetExposureInfo(); UpdateText($"{ENDeveloperToolsViewModel.GetLastPullResult()}"); }