示例#1
0
        void Execute()
        {
            List <Tutorial> Tutorials = PrepareTutorials();

            string             TemplateName = !string.IsNullOrWhiteSpace(Settings.Template)? Settings.Template: "Default";
            IDocTemplateModule Template     = Lib.GetTemplateModule(TemplateName);

            PrepareParseFileList();
            Parse();
            Global.Fixup();

            DocContext Context = new DocContext(Global, Settings, Tutorials);

            Template.Execute(Context);
        }
示例#2
0
        /* public */
        public void Execute(DocContext Context)
        {
            this.Global    = Context.Global;
            this.Settings  = Context.Settings;
            this.Tutorials = Context.Tutorials;


            HeaderText = !string.IsNullOrWhiteSpace(Settings.DocTitle) ? Settings.DocTitle : string.Empty;
            FooterText = !string.IsNullOrWhiteSpace(Settings.FooterText) ? Settings.FooterText : string.Empty;
            DateText   = Settings.DisplayDate ? DateTime.Now.ToString("yyyy-MM-dd") : string.Empty;



            PrepareFolders();
            LoadTemplateHtmlFiles();
            //PrepareTutorials();

            Namespaces = Global.GetAllNamespaces();

            CreateSidebar();

            CreateTutorialPages();
            CreateHomePage();

            CreateNamespacePage(Global);
            foreach (var Item in Namespaces)
            {
                CreateNamespacePage(Item);
            }


            List <DocItem> Items = Global.GetAllClasses();

            Items.AddRange(Global.GetInterfaces());
            Items.AddRange(Global.GetAllEnums());

            foreach (var Item in Items)
            {
                CreateClassPage(Item);
            }
        }