[runtime] Disable some tests in full-aot mode which cannot be AOTed because of type...
[mono.git] / mcs / tools / mdoc / Mono.Documentation / webdoc.cs
index 857a06339aca4f523407dcd04e0f39a247c0577d..75d65a244b05105fd3f9fae787a0eca2b0d17166 100644 (file)
@@ -70,9 +70,9 @@ namespace Mono.Documentation
                                formatOptions [0],
                                formatOptions [1],
                                { "o|out=",
-                                       "The {PREFIX} to place the generated files and directories.  " + 
+                                       "The {PREFIX} to place the generated files and directories.  " +
                                        "Default: \"`dirname FILE`/cache/\".\n" +
-                                       "Underneath {PREFIX}, `basename FILE .tree` directories will be " + 
+                                       "Underneath {PREFIX}, `basename FILE .tree` directories will be " +
                                        "created which will contain the pre-generated HTML content.",
                                        v => opts.OutputDirectory = v },
                                { "r=",
@@ -85,11 +85,11 @@ namespace Mono.Documentation
                                        "Default is " + (opts.UseSystemSources ? "enabled" : "disabled") + ".",
                                        v => opts.UseSystemSources = v != null },
                        };
-                       Parse (options, args, "export-html-webdoc", 
+                       Parse (options, args, "export-html-webdoc",
                                        "[OPTIONS]+ FILES",
                                        "Export mdoc documentation within FILES to HTML for use by ASP.NET webdoc.\n\n" +
                                        "FILES are .tree or .zip files as produced by 'mdoc assemble', or .source files\n" +
-                                       "which reference .tree and .zip files produced by 'mdoc assemble'.\n\n" + 
+                                       "which reference .tree and .zip files produced by 'mdoc assemble'.\n\n" +
                                        "See mdoc(5) or mdoc-assemble(1) for information about the .source file format.");
                        if (opts.Formats.Values.All (files => files.Count == 0))
                                Error ("No files specified.");
@@ -119,7 +119,7 @@ namespace Mono.Documentation
                        try {
                                var source = XElement.Load (sourceFile);
                                return source.Descendants ("source")
-                                       .Select (e => new KeyValuePair<string, string>(e.Attribute ("provider").Value, 
+                                       .Select (e => new KeyValuePair<string, string>(e.Attribute ("provider").Value,
                                                                Path.Combine (Path.GetDirectoryName (sourceFile), e.Attribute ("basefile").Value + ".tree")));
                        }
                        catch (Exception e) {
@@ -130,15 +130,15 @@ namespace Mono.Documentation
 
                void ProcessFiles (Options opts, string format, List<string> files)
                {
-                       foreach (var basePath in 
-                                       files.Select (f => 
+                       foreach (var basePath in
+                                       files.Select (f =>
                                                        Path.Combine (Path.GetDirectoryName (f), Path.GetFileNameWithoutExtension (f)))
                                        .Distinct ()) {
                                string treeFile = basePath + ".tree";
                                string zipFile  = basePath + ".zip";
                                if (!Exists (treeFile) || !Exists (zipFile))
                                        continue;
-                               string outDir = opts.OutputDirectory != null 
+                               string outDir = opts.OutputDirectory != null
                                        ? Path.Combine (opts.OutputDirectory, Path.GetFileName (basePath))
                                        : XmlDocUtils.GetCacheDirectory (basePath);
                                if (!opts.ForceUpdate && Directory.Exists (outDir) &&
@@ -196,15 +196,14 @@ namespace Mono.Documentation
                        }
                        hs.RootTree = docRoot;
                        var generator = new HtmlGenerator (new NullCache ());
-                       foreach (Node node in tree.RootNode.TraverseDepthFirst<Node, Node> (t => t, t => t.Nodes)) {
+                       foreach (Node node in tree.RootNode.TraverseDepthFirst<Node, Node> (t => t, t => t.ChildNodes)) {
                                var url = node.PublicUrl;
                                Message (TraceLevel.Info, "\tProcessing URL: {0}", url);
                                if (string.IsNullOrEmpty (url))
                                        continue;
                                var file = XmlDocUtils.GetCachedFileName (outDir, url);
                                using (var o = File.AppendText (file)) {
-                                       Node _;
-                                       string contents = docRoot.RenderUrl (url, generator, out _);
+                                       string contents = docRoot.RenderUrl (url, generator, hs);
                                        o.Write (contents);
                                }
                        }