コード例 #1
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.en_developer_tools);
     _viewModel = new ENDeveloperToolsViewModel();
     InitLayout();
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 private void PullKeys()
 {
     Task.Run(async() =>
     {
         await DiagnosisKeysDataMappingUtils.SetDiagnosisKeysDataMappingAsync();
         await _viewModel.PullKeysFromServer();
         UpdateText($"{ENDeveloperToolsViewModel.GetLastPullResult()}");
     });
 }
コード例 #4
0
        async partial void ENDevPullKeysAndGetExposureInfo_TouchUpInside(UIButton sender)
        {
            await _enDeveloperViewModel.PullKeysFromServerAndGetExposureInfo();

            ENDevOutput.Text = ENDeveloperToolsViewModel.GetLastPullResult();
        }
コード例 #5
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     _enDeveloperViewModel = new ENDeveloperToolsViewModel();
     _enDeveloperViewModel.DevToolUpdateOutput += updateUI;
 }
コード例 #6
0
        private async void PullKeysAndGetExposureInfo()
        {
            await _viewModel.PullKeysFromServerAndGetExposureInfo();

            UpdateText($"{ENDeveloperToolsViewModel.GetLastPullResult()}");
        }