public Program()
        {
            //Test DotNet namespace
            string outputFolder = Path.Combine(GetMainDirectory(), "DataFiles");

            outputFolder = Path.Combine(outputFolder, "bin");
            outputFolder = Path.Combine(outputFolder, "Release");
            outputFolder = Path.Combine(outputFolder, Properties.Settings.Default.NetVersion);
            string xmlFilename = Path.Combine(outputFolder, "WithoutHaste.DataFiles.XML");
            string dllFilename = Path.Combine(outputFolder, "WithoutHaste.DataFiles.dll");
            DotNetDocumentationFile docFile = new DotNetDocumentationFile(xmlFilename);

            docFile.AddAssemblyInfo(dllFilename);
            Console.WriteLine("Found {0} types in assembly", docFile.Types.Count);

            //Test Markdown namespace
            MarkdownFile mdFile = new MarkdownFile();

            mdFile.AddSection("A Header");
            string mdText = mdFile.ToMarkdownString();

            Console.WriteLine("Some markdown: {0}", mdText);

            Console.WriteLine("Done");
            Console.ReadLine();
        }
Exemplo n.º 2
0
 private void Save(MarkdownFile markdown, string directory, string filename)
 {
     using (StreamWriter writer = new StreamWriter(Path.Combine(directory, filename)))
     {
         writer.Write(markdown.ToMarkdownString());
     }
 }