Exemple #1
0
        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));
        }
Exemple #2
0
 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));
 }
Exemple #3
0
        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);
 }