public static DiagnosticModel From(DiagnosticsComponent diagnosticsComponent, SignboardHealth signboardHealth) { return new DiagnosticModel() { DiagnosticDate = DateTime.UtcNow, SoftwareVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(), Metrics = diagnosticsComponent.GetMetrics(), SignboardHealth = signboardHealth }; }
public SlideshowState UpdateStructure(SignboardHealth signboardHealth) { var diagnosticModel = DiagnosticModel.From(diagnosticsComponent, signboardHealth); var structure = SlideshowStructureComponent.GetInstance().GetSlideshowStructure(macAddress, diagnosticModel); if (structure == null) { return null; } bool hardReload = false; if (structure.Requests != null) { foreach (Request request in structure.Requests) { handleRequest(request, structure); } } if (structure != null) { SlideshowState.Update(structure.Copy()); } SlideshowState.HardReload = hardReload; SlideshowState.IsShowScreensaver = structure.IsShowScreensaver; SlideshowState.FontFactor = structure.FontSizeFactor; return SlideshowState; }