Esempio n. 1
0
        public IEnumerable <Template> LoadAll()
        {
            foreach (var render in _rendererLoader.LoadAll())
            {
                var preprocessors = _preprocessorLoader.LoadFromRenderer(render).ToList();
                if (preprocessors.Count > 1)
                {
                    Logger.Log(
                        LogLevel.Warning,
                        $"Multiple template preprocessors '{preprocessors.Select(s => s.Path).ToDelimitedString()}'(case insensitive) are found for template page '{preprocessors[0].Name}', '{preprocessors[0].Path}' is used and others are ignored.");
                }

                yield return(new Template(render, preprocessors.FirstOrDefault()));
            }

            foreach (var p in _preprocessorLoader.LoadStandalones())
            {
                yield return(new Template(null, p));
            }
        }