Ejemplo n.º 1
0
        /// <summary>
        /// Generates the folder readme.
        /// </summary>
        /// <param name="folders">The folders.</param>
        /// <param name="folder">The folder.</param>
        /// <returns></returns>
        protected String generateFolderReadme(IEnumerable <folderNode> folders, folderNode folder = null)
        {
            builderForMarkdown builder = new builderForMarkdown();


            if (folder != null)
            {
                builder.AppendHeading("Folder structure", 2);
                builder.AppendLine();


                builder.AppendHeading(folder.name, 3);
                builder.AppendLine(" > " + folder.path);
                builder.AppendLine(" > " + folder.description);
                builder.AppendLine();


                builder.AppendHorizontalLine();
            }
            else
            {
                builder.AppendHeading("Folder structure", 2);
                builder.AppendLine();

                builder.AppendParagraph("Application directory structure");
                builder.AppendHorizontalLine();

                foreach (var fold in folders)
                {
                    //    builder.nextTabLevel();
                    builder.AppendHeading(fold.name, 3);
                    builder.AppendLine(" > " + fold.path);
                    builder.AppendLine(" > " + fold.description);
                    builder.AppendLine();
                    //  builder.prevTabLevel();
                }
            }



            builder.AppendLine();
            builder.AppendHorizontalLine();

            PropertyCollection pc = notation.buildPropertyCollection <PropertyCollection>(false, false, "cite");

            builder.AppendPairs(pc, false);


            builder.AppendLine();
            builder.AppendHorizontalLine();

            builder.AppendLine("File generated: ".add(DateTime.Now.ToLongDateString(), " ").add(DateTime.Now.ToLongTimeString()));
            builder.AppendLine("Application: <<".add(name, " ").add(">>", " "));


            return(builder.ContentToString(true));
        }