Process/compare/output method's generic parameters [#15311]
[mono.git] / mcs / tools / corcompare / mono-api-html / ConstructorComparer.cs
index 5415c83b13a97f4c043c169cb440e87075749863..93c4dbd590b1496100bd3ff8d613507221c4d4c0 100644 (file)
@@ -84,8 +84,18 @@ namespace Xamarin.ApiDiff {
 
                        // the XML file `name` does not contain parameter names, so we must process them ourselves
                        // which gives us the opportunity to simplify type names
-                       sb.Append (name.Substring (0, name.IndexOf ('('))).Append (" (");
+                       sb.Append (name.Substring (0, name.IndexOf ('(')));
 
+                       var genericp = e.Element ("generic-parameters");
+                       if (genericp != null) {
+                               var list = new List<string> ();
+                               foreach (var p in genericp.Elements ("generic-parameter")) {
+                                       list.Add (p.GetTypeName ("name"));
+                               }
+                               sb.Append ("&lt;").Append (String.Join (", ", list)).Append ("&gt;");
+                       }
+
+                       sb.Append (" (");
                        var parameters = e.Element ("parameters");
                        if (parameters != null) {
                                var list = new List<string> ();