// Methods private Log() { _fileLogger = new FileLogger (); enableLogFile = false; catchEx = true; workThread = new Thread (new ThreadStart (this.WorkFunction)); workThread.Name = "Logger Thread"; workThread.Priority = ThreadPriority.BelowNormal; workThread.Start (); flag = new AutoResetEvent (false); eventQueue = new Queue<LogEvent> (); }
private void Dispose(bool disposing) { if (disposing) { lock (eventQueue) { if (this.workThread != null) { this.workThread.Abort (); this.workThread.Join (); this.workThread = null; } if (this.flag != null) { this.flag.Close (); this.flag = null; } if (_fileLogger != null) { _fileLogger.Dispose (true); _fileLogger = null; } } } }