Пример #1
0
 public void Dispose()
 {
     this.Stop();
     if (this.monitors != null)
     {
         this.monitors.Dispose();
         this.monitors = null;
     }
 }
Пример #2
0
        public TestMonitor(ILoggerService loggerService)
        {
            this.loggerService             = loggerService;
            this.consoleMonitor            = new ConsoleMonitor();
            this.timeMonitor               = new TimeMonitor();
            this.unhandledExceptionMonitor = new UnhandledExceptionMonitor();
            this.threadExceptionMonitor    = new ThreadExceptionMonitor(loggerService);
            this.debugMonitor              = new DebugMonitor(loggerService);
            this.loggerListener            = new XmlLoggerListener();

            this.monitors = new MonitorCollection(loggerService);
            this.monitors.Add(this.consoleMonitor);
            this.monitors.Add(this.timeMonitor);
            this.monitors.Add(this.unhandledExceptionMonitor);
            this.monitors.Add(this.threadExceptionMonitor);
            this.monitors.Add(this.debugMonitor);
            this.monitors.Add(new EnvironmentMonitor());
            this.monitors.Add(new ThreadMonitor());
        }