예제 #1
0
        public AggregatedAlert(string?source, string?target, DateTime time, StatusAuditReport?initialReport)
        {
            StatusAuditReport report = initialReport ?? new StatusAuditReport(time, TimeSpan.Zero, null, StatusAuditAlert.None);

            CommonAlert = report.Alert;
            RatingSum   = report.Alert?.Rating ?? StatusRating.Okay;
            Sources     = new List <string>();
            Sources.Add(RenderSource(source));
            Target             = RenderTarget(target);
            TimeRange          = new DateTimeRange(time);
            Report             = report;
            AuditStartRange    = new DateTimeRange(report.AuditStartTime);
            AuditDurationRange = new TimeSpanRange(report.AuditDuration);
            NextAuditTime      = report.NextAuditTime;
            PropertyRanges     = new List <StatusPropertyRange>();
        }
예제 #2
0
        public AggregatedAlert(StatusResults initialResults)
        {
            StatusAuditReport report = initialResults.Report ?? new StatusAuditReport(initialResults.Time, TimeSpan.Zero, null, StatusAuditAlert.None);

            CommonAlert = report.Alert;
            RatingSum   = report.Alert?.Rating ?? StatusRating.Okay;
            Sources     = new List <string>();
            Sources.Add(RenderSource(initialResults.SourceSystem));
            Target             = RenderTarget(initialResults.TargetSystem);
            TimeRange          = new DateTimeRange(initialResults.Time);
            Report             = report;
            AuditStartRange    = new DateTimeRange(report.AuditStartTime);
            AuditDurationRange = new TimeSpanRange(report.AuditDuration);
            NextAuditTime      = report.NextAuditTime;
            PropertyRanges     = new List <StatusPropertyRange>();
        }