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

FinalizeFile() private method

Writes the file footer and finalizes the file in FileTarget instance internal structures.
private FinalizeFile ( string fileName, bool isArchiving = false ) : void
fileName string File name to close.
isArchiving bool Indicates if the file is being finalized for archiving.
return void
        private void FinalizeFile(string fileName, bool isArchiving = false)
        {
            if ((isArchiving) || (!this.WriteFooterOnArchivingOnly))
                WriteFooter(fileName);

            this.fileAppenderCache.InvalidateAppender(fileName);
            this.initializedFiles.Remove(fileName);
        }