Exemplo n.º 1
0
        private static void TryGenerateDocumentation(IHostingEnvironment env)
        {
            try
            {
                var docGenerator = new DocumentGenerator();
                var settings     = new DefaultGeneratorSettings
                {
                    OutputFolder = System.IO.Path.Combine(env.WebRootPath, "docs"),
                    Assembly     = Assembly.GetExecutingAssembly()
                };

                var apiDocument = docGenerator.Generate(new DefaultDocumentSettings
                {
                    Name    = "RavenNest API Documentation",
                    Version = "v1.0"
                }, settings);

                var processor = new HtmlDocumentProcessor();

                processor.ProcessAsync(settings, apiDocument).Wait();
            }
            catch { }
        }