Exemplo n.º 1
0
        private static ScanRequest BuildRequest(ICollection <Template> templates, IEnumerable <Assembly> assemblies, params string[] roots)
        {
            var request = new ScanRequest();

            request.Include("*.spark");

            roots.ToList().ForEach(request.AddRoot);
            request.AddHandler(fileFound => templates.Add(GetTemplate(fileFound, assemblies)));

            return(request);
        }
Exemplo n.º 2
0
        public void Scan(ScanRequest request)
        {
            var fileSet = new FileSet {
                Include = request.Filters, DeepSearch = false
            };

            _scannedDirectories = new List <string>();

            foreach (var root in request.Roots)
            {
                Scan(root, root, fileSet, request.OnFound, request.ExcludedDirectories);
            }
        }