diff options
Diffstat (limited to 'mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs')
-rw-r--r-- | mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs | 21 |
1 files changed, 16 insertions, 5 deletions
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; } |