/// <summary> /// Generate a reporting summary for warboards etc. /// </summary> /// <returns>The consolidated reporting summary</returns> public ReportingSummary GetReportingSummary() { // Create a blank report as we won't be returning everything ReportingSummary reportingSummary = new ReportingSummary() { Applications = new List <ReportingApplication>() }; // Loop all the applications return(reportingSummary); }
/// <summary> /// Load the metrics from the cache location (if the service restarted etc.) /// </summary> /// <param name="loadDirectory"></param> /// <returns></returns> public Boolean LoadData(String loadDirectory) { CheckSaveDirectory(loadDirectory); String serialisedData = File.ReadAllText(Path.Combine(loadDirectory, saveFileName)); ReportingSummary reportingSummary = JsonConvert.DeserializeObject <ReportingSummary>(serialisedData); if (reportingSummary != null) { #warning TODO: POC for now, Do mapping with more complex summary later applications = new Dictionary <String, ReportingApplication>(); reportingSummary.Applications.ForEach(app => { applications.Add(app.Name, app); }); } return(true); }