[mono-api-html] Print ref/out modifiers on parameters. Fixes #59430.
authorRolf Bjarne Kvinge <rolf@xamarin.com>
Mon, 18 Sep 2017 12:34:55 +0000 (14:34 +0200)
committerMarek Safar <marek.safar@gmail.com>
Thu, 21 Sep 2017 05:25:20 +0000 (07:25 +0200)
Print ref/out modifiers on parameters, so that any changes in ref/out are detected.

https://bugzilla.xamarin.com/show_bug.cgi?id=59430

mcs/tools/mono-api-html/ConstructorComparer.cs

index 9bd837e241fe94065b70d30a15c2d6acc82bdfb6..e322d4ef556875ee0a770cdb2808f6a371f2ef37 100644 (file)
@@ -133,10 +133,15 @@ namespace Xamarin.ApiDiff {
                        if (parameters != null) {
                                var list = new List<string> ();
                                foreach (var p in parameters.Elements ("parameter")) {
-                                       var pTypeName   = p.GetTypeName ("type");
-                                       list.Add (State.IgnoreParameterNameChanges
-                                               ? pTypeName
-                                               : pTypeName + " " + p.GetAttribute ("name"));
+                                       var param = p.GetTypeName ("type");
+                                       if (!State.IgnoreParameterNameChanges)
+                                               param += " " + p.GetAttribute ("name");
+
+                                       var direction = p.GetAttribute ("direction");
+                                       if (direction?.Length > 0)
+                                               param = direction + " " + param;
+                                               
+                                       list.Add (param);
                                }
                                sb.Append (String.Join (", ", list));
                        }