예제 #1
0
        protected IEnumerable <T> locateTemplates(string name, T fromTemplate, bool sharedsOnly)
        {
            var directories = sharedsOnly
                ? _provider.SharedPathsOf(fromTemplate)
                : _provider.ReachablesOf(fromTemplate);

            return(_templates.ByNameUnderDirectories(name, directories));
        }
예제 #2
0
        private IEnumerable <ITemplate> locateTemplates(string name, ITemplate fromTemplate, ITemplateRegistry templateRegistry, bool sharedsOnly)
        {
            var directories = sharedsOnly
                ? _provider.SharedPathsOf(fromTemplate, templateRegistry)
                : _provider.ReachablesOf(fromTemplate, templateRegistry);

            return(templateRegistry.ByNameUnderDirectories(name, directories));
        }