Esempio n. 1
0
 static ReportUtility()
 {
     _report = new DocsetReport
     {
         Files = new Dictionary <string, ReportItem>()
     };
 }
Esempio n. 2
0
        public static void Save(string workingFolder, string file, string docsetFolder = "")
        {
            var newReport = new DocsetReport
            {
                Files = new Dictionary <string, ReportItem>()
            };

            foreach (var entry in _report.Files)
            {
                var relativePath = Path.Combine(docsetFolder, entry.Key);

                newReport.Files.Add(relativePath, entry.Value);
            }
            var filePath = Path.Combine(workingFolder, file);
            var content  = JsonConvert.SerializeObject(newReport, Formatting.Indented);

            File.WriteAllText(filePath, content);
        }