summaryrefslogtreecommitdiff
path: root/mcs/class/monodoc/Monodoc
diff options
context:
space:
mode:
authorJo Shields <directhex@apebox.org>2014-02-19 22:12:43 +0000
committerJo Shields <directhex@apebox.org>2014-02-19 22:12:43 +0000
commit9972bf87b4f27d9c8f358ef8414ac1ab957a2f0f (patch)
tree5bb230c1d698659115f918e243c1d4b0aa4c7f51 /mcs/class/monodoc/Monodoc
parentd0a215f5626219ff7927f576588a777e5331c7be (diff)
downloadmono-upstream/3.2.8+dfsg.tar.gz
Imported Upstream version 3.2.8+dfsgupstream/3.2.8+dfsg
Diffstat (limited to 'mcs/class/monodoc/Monodoc')
-rw-r--r--mcs/class/monodoc/Monodoc/generators/html/Man2Html.cs2
-rw-r--r--mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs21
2 files changed, 17 insertions, 6 deletions
diff --git a/mcs/class/monodoc/Monodoc/generators/html/Man2Html.cs b/mcs/class/monodoc/Monodoc/generators/html/Man2Html.cs
index d4f9cc2665..a065daf212 100644
--- a/mcs/class/monodoc/Monodoc/generators/html/Man2Html.cs
+++ b/mcs/class/monodoc/Monodoc/generators/html/Man2Html.cs
@@ -240,7 +240,7 @@ namespace Monodoc.Generators.Html
static void ClearUntil (StateInfo s, string required)
{
- string e;
+ string e = null;
while (s.tags.Count > 0 &&
(e = s.tags.Peek ().ToString ()) != required) {
s.output.Append (s.tags.Pop ().ToString ());
diff --git a/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs b/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs
index 360889f6a7..efdeedf63a 100644
--- a/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs
+++ b/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs
@@ -54,7 +54,17 @@ namespace Monodoc.Providers
nsSummaries[nsName] = nsElements = new XElement ("elements",
new XElement ("summary"),
new XElement ("remarks"));
-
+ //Add namespace summary and remarks data from file, if available
+ var nsFileName = Path.Combine(asm, String.Format("ns-{0}.xml", nsName));
+ if(File.Exists(nsFileName)){
+ var nsEl = XElement.Load (nsFileName);
+
+ nsElements.Element ("summary").ReplaceWith (nsEl.Descendants ("summary").First ());
+ nsElements.Element ("remarks").ReplaceWith (nsEl.Descendants ("remarks").First ());
+ }else{
+ Console.WriteLine ("Error reading namespace XML for " + nsName);
+ }
+
foreach (var type in ns.Elements ("Type")) {
// Add the XML file corresponding to the type to our storage
var id = indexGenerator (type);
@@ -541,10 +551,11 @@ namespace Monodoc.Providers
break;
// binary operators: overloading is possible [ECMA-335 ยง10.3.2]
default:
- memberSignature =
- nicename + "("
- + string.Join (",", member.Element ("Parameters").Elements ("Parameter").Select (p => (string)p.Attribute ("Type")))
- + ")";
+ if (member.Element ("Parameters") != null)
+ memberSignature =
+ nicename + "("
+ + string.Join (",", member.Element ("Parameters").Elements ("Parameter").Select (p => (string)p.Attribute ("Type")))
+ + ")";
break;
}