Пример #1
0
        private DiagnoserSessionStub CreateDiagnoserSession(string type, int numFiles, DiagnosisStatus collectStatus, DiagnosisStatus analyzeStatus)
        {
            DiagnoserSessionStub d = new DiagnoserSessionStub
            {
                Diagnoser = new DiagnoserStub(type + "LogsDiag"),
                CollectorDiagnosisStatus = collectStatus,
                AnalyzerDiagnosisStatus  = analyzeStatus
            };

            for (int i = 0; i < numFiles; i++)
            {
                d.AddLog(new LogStub
                {
                    StartTime = DateTime.Now,
                    EndTime   = DateTime.Now,
                    FileName  = type + "Log" + i + ".txt",
                    FullPath  = @"\\path\to\" + type + "Log" + i + ".txt"
                });
                d.AddReport(new ReportStub
                {
                    FileName = "httpReport" + i + ".txt",
                    FullPath = @"\\path\to\" + type + "Report" + i + ".txt"
                });
            }

            return(d);
        }
Пример #2
0
 public void AddDiagnoser(DiagnoserSessionStub diagnoser)
 {
     _diagnosers.Add(diagnoser);
 }