Exemple #1
0
        private async Task <string> SaveExposureResult(ExposureResult exposureResult)
        {
            string fileName = $"exposuredata-{exposureResult.GetHashCode()}.json";
            string json     = exposureResult.ToJsonString();

            var filePath = Path.Combine(_exposureDetectionResultDir, fileName);
            await File.WriteAllTextAsync(filePath, json);

            return(filePath);
        }
Exemple #2
0
        public static async Task SaveExposureResult(ExposureResult exposureResult, string version, string outputDir)
        {
            exposureResult.Device    = DeviceInfo.Model;
            exposureResult.EnVersion = version;

            string fileName = $"{exposureResult.Id}.json";
            var    filePath = Path.Combine(outputDir, fileName);

            string json = exposureResult.ToJsonString();

            D.Print(json);

            await File.WriteAllTextAsync(filePath, json);
        }