public TemplateManager(Assembly assembly, string rootNamespace, List <string> templates, List <string> themes, string baseDirectory)
        {
            var resourceFinder = new ResourceFinder(assembly, rootNamespace, baseDirectory);

            if (templates == null || templates.Count == 0)
            {
                Logger.Log(LogLevel.Info, "Template is not specified, files will not be transformed.");
            }
            else
            {
                var templateResources = templates.Select(s => resourceFinder.Find(s)).Where(s => s != null).ToArray();
                if (templateResources.Length == 0)
                {
                    Logger.Log(LogLevel.Warning, $"No template resource found for [{templates.ToDelimitedString()}].");
                }
                else
                {
                    _templateProcessor = new TemplateProcessor(new CompositeResourceCollectionWithOverridden(templateResources));
                }
            }

            if (themes == null || themes.Count == 0)
            {
                Logger.Log(LogLevel.Info, "Theme is not specified, no additional theme will be applied to the documentation.");
            }
            else
            {
                var themeResources = themes.Select(s => resourceFinder.Find(s)).Where(s => s != null).ToArray();
                if (themeResources.Length == 0)
                {
                    Logger.Log(LogLevel.Warning, $"No theme resource found for [{themes.ToDelimitedString()}].");
                }
                else
                {
                    _themeResource = new CompositeResourceCollectionWithOverridden(themeResources);
                }
            }
        }
Beispiel #2
0
 public TemplateManager(Assembly assembly, string rootNamespace, List<string> templates, List<string> themes, string baseDirectory)
 {
     var resourceFinder = new ResourceFinder(assembly, rootNamespace, baseDirectory);
     if (templates == null || templates.Count == 0)
     {
         Logger.Log(LogLevel.Info, "Template is not specified, files will not be transformed.");
     }
     else
     {
         var templateResources = templates.Select(s => resourceFinder.Find(s)).Where(s => s != null).ToArray();
         if (templateResources.Length == 0)
         {
             Logger.Log(LogLevel.Warning, $"No template resource found for [{templates.ToDelimitedString()}].");
         }
         else
         {
             _templateProcessor = new TemplateProcessor(new CompositeResourceCollectionWithOverridden(templateResources));
         }
     }
     
     if (themes == null || themes.Count == 0)
     {
         Logger.Log(LogLevel.Info, "Theme is not specified, no additional theme will be applied to the documentation.");
     }
     else
     {
         var themeResources = themes.Select(s => resourceFinder.Find(s)).Where(s => s != null).ToArray();
         if (themeResources.Length == 0)
         {
             Logger.Log(LogLevel.Warning, $"No theme resource found for [{themes.ToDelimitedString()}].");
         }
         else
         {
             _themeResource = new CompositeResourceCollectionWithOverridden(themeResources);
         }
     }
 }
Beispiel #3
0
 public TemplateManager(Assembly assembly, string rootNamespace, List <string> templates, List <string> themes, string baseDirectory)
 {
     _finder    = new ResourceFinder(assembly, rootNamespace, baseDirectory);
     _templates = templates;
     _themes    = themes;
 }
Beispiel #4
0
 public TemplateManager(Assembly assembly, string rootNamespace, List<string> templates, List<string> themes, string baseDirectory)
 {
     _finder = new ResourceFinder(assembly, rootNamespace, baseDirectory);
     _templates = templates;
     _themes = themes;
 }