NLog.Targets.FileTarget.CloseTarget C# (CSharp) Method

CloseTarget() protected method

Closes the file(s) opened for writing.
protected CloseTarget ( ) : void
return void
        protected override void CloseTarget()
        {
            base.CloseTarget();

            foreach (string fileName in new List<string>(this.initializedFiles.Keys))
            {
                this.FinalizeFile(fileName);
            }

            if (this.autoClosingTimer != null)
            {
                this.autoClosingTimer.Change(Timeout.Infinite, Timeout.Infinite);
                this.autoClosingTimer.Dispose();
                this.autoClosingTimer = null;
            }

            this.StopAppenderInvalidatorThread();

            this.fileAppenderCache.CloseAppenders();
        }