public async Task ExposureDetectedAsync(IList <DailySummary> dailySummaries, IList <ExposureWindow> exposureWindows, ExposureConfiguration exposureConfiguration) { Logger.D($"ExposureDetected ExposureWindows: {DateTime.UtcNow}"); var enVersion = (await EnClient.GetVersionAsync()).ToString(); var exposureResult = new ExposureResult( exposureConfiguration, DateTime.Now, dailySummaries, exposureWindows ) { Device = DeviceInfo.Model, EnVersion = enVersion }; var filePath = await SaveExposureResult(exposureResult); var exposureDataServerConfiguration = await LoadExposureDataServerConfiguration(); var exposureDataResponse = await new ExposureDataServer(exposureDataServerConfiguration).UploadExposureDataAsync( exposureConfiguration, DeviceInfo.Model, enVersion, dailySummaries, exposureWindows ); if (exposureDataResponse != null) { await SaveExposureResult(exposureDataResponse); File.Delete(filePath); } }
public override async Task <long> GetVersionAsync() { return(await Client.GetVersionAsync()); }
public override Task <long> GetVersionAsync() => _exposureNotificationClient.GetVersionAsync();