Esempio n. 1
0
 public PlatformExposureSummary(AndroidExposureSummary source)
 {
     AttenuationDurationsInMillis = ConvertToMillis(source.GetAttenuationDurationsInMinutes());
     DaysSinceLastExposure        = source.DaysSinceLastExposure;
     MatchedKeyCount    = (ulong)source.MatchedKeyCount;
     MaximumRiskScore   = source.MaximumRiskScore;
     SummationRiskScore = source.SummationRiskScore;
 }
Esempio n. 2
0
            private async Task <(ExposureSummary, IList <ExposureInformation> exposureInformations)> GetExposureV1Async(
                ExposureNotificationClient enClient,
                string token
                )
            {
                Logger.D($"GetExposureV1Async");

                AndroidExposureSummary exposureSummary = await enClient.EnClient.GetExposureSummaryAsync(token);

                IList <AndroidExposureInformation> eis = await enClient.EnClient.GetExposureInformationAsync(token);

                IList <ExposureInformation> exposureInformations = eis.Select(ei => (ExposureInformation) new PlatformExposureInformation(ei)).ToList();

                return(new PlatformExposureSummary(exposureSummary), exposureInformations);
            }