From: Rolf Bjarne Kvinge Date: Wed, 27 Jan 2016 16:38:40 +0000 (+0100) Subject: [mono-api-info] First filter, then order, and use ordinal comparison. X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=0f83276b643aef479aab95b8bd755572dc64e15a [mono-api-info] First filter, then order, and use ordinal comparison. --- diff --git a/mcs/tools/corcompare/mono-api-info.cs b/mcs/tools/corcompare/mono-api-info.cs index 4abfffd8946..e2bbb36751a 100644 --- a/mcs/tools/corcompare/mono-api-info.cs +++ b/mcs/tools/corcompare/mono-api-info.cs @@ -1120,10 +1120,12 @@ namespace CorCompare if (ass != null && !Driver.FollowForwarders) TypeForwardedToData.OutputForwarders (writer, ass); - foreach (var att in provider.CustomAttributes.OrderBy ((a) => a.Constructor.DeclaringType.FullName)) { + var attributes = provider.CustomAttributes. + Where ((att) => !SkipAttribute (att)). + OrderBy ((a) => a.Constructor.DeclaringType.FullName, StringComparer.Ordinal); + + foreach (var att in attributes) { string attName = Utils.CleanupTypeName (att.Constructor.DeclaringType); - if (SkipAttribute (att)) - continue; writer.WriteStartElement ("attribute"); AddAttribute ("name", attName);