[mono-api-info] Sort attributes.
authorRolf Bjarne Kvinge <rolf@xamarin.com>
Thu, 19 Nov 2015 08:59:36 +0000 (09:59 +0100)
committerRolf Bjarne Kvinge <rolf@xamarin.com>
Thu, 19 Nov 2015 09:28:37 +0000 (10:28 +0100)
So that info files can be compared textually to test for api equality.

mcs/tools/corcompare/mono-api-info.cs

index e9018e2555504459acbe2964449de9ef74bd2ea0..5a21d52f1134e133c1ef8792f9ddf7f6fe9b225e 100644 (file)
@@ -1031,9 +1031,7 @@ namespace CorCompare
                                parent.AppendChild (natts);
                        }
 
-                       for (int i = 0; i < atts.Count; ++i) {
-                               CustomAttribute att = atts [i];
-
+                       foreach (var att in atts.OrderBy ((a) => a.Constructor.DeclaringType.FullName)) {
                                string attName = Utils.CleanupTypeName (att.Constructor.DeclaringType);
                                if (SkipAttribute (att))
                                        continue;