[runtime] Disable some tests in full-aot mode which cannot be AOTed because of type...
[mono.git] / mcs / class / monodoc / Monodoc / generators / html / MonoBook2Html.cs
1 using System;
2 using System.IO;
3 using System.Text;
4 using System.Xml;
5 using System.Collections.Generic;
6
7 using Monodoc;
8 using Monodoc.Generators;
9
10 namespace Monodoc.Generators.Html
11 {
12         // Input is expected to be already HTML so just return it
13         public class MonoBook2Html : IHtmlExporter
14         {
15                 public string CssCode {
16                         get {
17                                 return @"   h3 { 
18        font-size: 18px;
19        padding-bottom: 4pt;
20        border-bottom: 2px solid #dddddd;
21    }
22        
23    .api {
24      border: 1px solid;
25      padding: 10pt;
26      margin: 10pt;
27    } 
28
29    .api-entry { 
30        border-bottom: none;
31        font-size: 18px;
32    }
33
34    .prototype {
35      border: 1px solid;
36      background-color: #f2f2f2;
37      padding: 5pt;
38      margin-top: 5pt;
39      margin-bottom: 5pt;  
40    } 
41
42    .header {
43      border: 1px solid !important;
44      padding: 0 0 5pt 5pt !important;
45      margin: 10pt !important;
46      white-space: pre !important;
47        font-family: monospace !important;
48      font-weight: normal !important;
49      font-size: 1em !important;
50    }
51     
52    .code {
53      border: 1px solid;
54      padding: 0 0 5pt 5pt;
55      margin: 10pt;
56      white-space: pre;
57        font-family: monospace;
58    }
59 ";
60                         }
61                 }
62
63                 public string Export (Stream input, Dictionary<string, string> extraArgs)
64                 {
65                         if (input == null)
66                                 return null;
67                         return FromXmlReader (XmlReader.Create (input));
68                 }
69
70                 public string Export (string input, Dictionary<string, string> extraArgs)
71                 {
72                         if (string.IsNullOrEmpty (input))
73                                 return null;
74                         return FromXmlReader (XmlReader.Create (new StringReader (input)));
75                 }
76
77                 public string FromXmlReader (XmlReader reader)
78                 {
79                         if (!reader.ReadToDescendant ("head"))
80                                 return null;
81                         if (!reader.ReadToNextSibling ("body"))
82                                 return null;
83
84                         return reader.ReadInnerXml ();
85                 }
86         }
87 }