public void Scan(ScanRequest request) { var fileSet = new FileSet { Include = request.Filters, DeepSearch = false }; _scannedDirectories = new List <string>(); request.Roots.Each(root => scan(root, root, fileSet, request.OnFound, request.ExcludedDirectories)); }
public void Scan(ScanRequest request) { var fileSet = new FileSet { Include = request.Filters, DeepSearch = false }; _scannedDirectories = new List<string>(); request.Roots.Each(root => scan(root, root, fileSet, request.OnFound, request.ExcludedDirectories)); }
private ScanRequest buildRequest(ICollection<ITemplate> templates, params SparkRoot[] sparkRoots) { var request = new ScanRequest(); _requestConfig.Do(request); sparkRoots.Each(r => request.AddRoot(r.Path)); request.AddHandler(fileFound => { var origin = sparkRoots.First(x => x.Path == fileFound.Root).Origin; var sparkFile = new Template(fileFound.Path, fileFound.Root, origin); templates.Add(sparkFile); }); return request; }
public static void IncludeSparkViews(this ScanRequest request) { var pattern = "*{0}".ToFormat(Constants.DotSpark); request.Include(pattern); }
public static void AddRoots(this ScanRequest request, IEnumerable <string> roots) { roots.Each(request.AddRoot); }