public FilePath GetCurrentFile(FilePath basePath)
        {
            var filesWithSuffix = RollingStrategyHelper.DiscoverExistingFiles(basePath, fileSystem, suffixFormatter);

            var part     = 1;
            var lastFile = filesWithSuffix.LastOrDefault();

            if (lastFile.suffix != null)
            {
                part = lastFile.suffix.Value;
                if (sizeBasedRoller.ShouldRollOver(lastFile.path))
                {
                    part++;
                }
            }

            return(RollingStrategyHelper.AddSuffix(basePath, suffixFormatter.FormatSuffix(part), false));
        }
 public FilePath GetCurrentFile(FilePath basePath) => RollingStrategyHelper.AddSuffix(basePath, suffixFormatter.FormatSuffix(timeProvider()), false);
Esempio n. 3
0
 public FilePath GetCurrentFile(FilePath basePath) => basePath + suffixFormatter.FormatSuffix(timeProvider());