Ejemplo n.º 1
0
        public static UIHealthReport CreateFrom(Exception exception)
        {
            var uiReport = new UIHealthReport(new Dictionary <string, UIHealthReportEntry>(), TimeSpan.FromSeconds(0))
            {
                Status = UIHealthStatus.Unhealthy,
            };

            const string SERVICE_NAME = "Endpoint";

            uiReport.Entries.Add(SERVICE_NAME, new UIHealthReportEntry()
            {
                Exception   = exception.Message,
                Description = exception.Message,
                Duration    = TimeSpan.FromSeconds(0),
                Status      = UIHealthStatus.Unhealthy
            });

            return(uiReport);
        }