Exemplo n.º 1
0
        void CreateClassPage(DocItem Item)
        {
            StringBuilder Content = new StringBuilder();

            AddTopItemHeader(Content, Item);

            DocItem        Constructor = Item.GetConstructor();
            List <DocItem> Constants   = Item.GetConstants();
            List <DocItem> Fields      = Item.GetFields();
            List <DocItem> Properties  = Item.GetProperties();
            List <DocItem> Functions   = Item.GetFunctions();

            //List<DocItem> Classes = Item.GetClasses().Cast<DocItem>().ToList();
            //List<DocItem> EventArgs = Item.GetEventArgs().Cast<DocItem>().ToList();
            //List<DocItem> Enums = Item.GetEnums().Cast<DocItem>().ToList();

            /*
             * Class
             *  Constructor
             *  Constants
             *  Fields
             *  Properties
             *  Functions
             *  Events
             *
             */

            if (!Item.IsStatic)
            {
                AddConstructor(Content, Constructor);
            }
            AddConstants(Content, Constants);
            AddFields(Content, Fields);
            AddProperties(Content, Properties);
            AddFunctions(Content, Functions);
            AddEvents(Content, Item.Events);


            StringBuilder SB = PreparePage(Item.FullName);

            string sContent = PrettyPrint(Content.ToString());

            SB.Replace("__CONTENT__", sContent);

            string sHtml = SB.ToString();

            string PageFileName = Item.FullName + ".html";
            string FilePath     = Path.Combine(OutputFolder, PageFileName);

            File.WriteAllText(FilePath, sHtml);
        }