NLog.Targets.FileTarget.DynamicFileArchive.InitializeForArchiveFolderPath C# (CSharp) Method

InitializeForArchiveFolderPath() public method

Adds the files in the specified path to the archive file queue.
public InitializeForArchiveFolderPath ( string archiveFolderPath ) : void
archiveFolderPath string The folder where the archive files are stored.
return void
            public void InitializeForArchiveFolderPath(string archiveFolderPath)
            {
                archiveFileQueue.Clear();
                if (Directory.Exists(archiveFolderPath))
                {
#if SILVERLIGHT && !WINDOWS_PHONE
                    var files = Directory.EnumerateFiles(archiveFolderPath);
#else
                    var files = Directory.GetFiles(archiveFolderPath);
#endif
                    foreach (string nextFile in files.OrderBy(f => ExtractArchiveNumberFromFileName(f)))
                        archiveFileQueue.Enqueue(nextFile);
                }
            }