void FindFiles(string directoryPath, List <string> files) { files.AddRange(FileEx.FindFiles(directoryPath, "*.source.md")); foreach (var subDirectory in Directory.EnumerateDirectories(directoryPath) .Where(IncludeDirectory)) { FindFiles(subDirectory, files); } }
void FindFiles(string directoryPath, List <string> files) { IEnumerable <string> findFiles; if (convention == DocumentConvention.SourceTransform) { findFiles = FileEx.FindFiles(directoryPath, "*.source.md"); } else { findFiles = FileEx.FindFiles(directoryPath, "*.md") .Where(x => !x.Contains(".include.")); } files.AddRange(findFiles); foreach (var subDirectory in Directory.EnumerateDirectories(directoryPath) .Where(IncludeDirectory)) { FindFiles(subDirectory, files); } }