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

ReplaceFileNamePattern() private static method

Replaces the string-based pattern i.e. {#} in a file name with the value passed in parameter.
private static ReplaceFileNamePattern ( string pattern, string replacementValue ) : string
pattern string File name which contains the string-based pattern.
replacementValue string Value which will replace the string-based pattern.
return string
        private static string ReplaceFileNamePattern(string pattern, string replacementValue)
        {
            //
            // TODO: ReplaceFileNamePattern() method is nearly identical to ReplaceNumberPattern(). Consider merging.
            //

            return new FileNameTemplate(Path.GetFileName(pattern)).ReplacePattern(replacementValue);
        }