/// <summary> /// Opens the file for writing. /// </summary> private void OpenFile() { lock (Locker) { if (this.file != null) { return; } this.file = new StreamWriter(this.GenerateFilePath(), (this.Flags & LogFileFlags.AppendFile) != LogFileFlags.None); lock (AllLocker) { All.AddLast(this); } } }