From b64de63e007356bf7cba4699b350994688b2e87b Mon Sep 17 00:00:00 2001 From: Felipe da Conceicao Guimaraes Date: Thu, 29 Jul 2021 10:17:07 -0300 Subject: [PATCH 1/3] adding orderby in foreach loop --- .../PresentationFramework/System/Windows/Markup/XmlnsCache.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsCache.cs index 03fe3eb9ce9..44ad95cdd33 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsCache.cs @@ -12,6 +12,7 @@ using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; +using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Security; @@ -93,7 +94,7 @@ private void AddReferencedAssemblies() List interestingAssemblies = new List(); // Load all the assemblies into a list. - foreach(string assemblyName in _assemblyPathTable.Keys) + foreach(string assemblyName in _assemblyPathTable.Keys.OfType().OrderBy(s => s)) { bool hasCacheInfo = true; Assembly assy; From ccfcaadccce60cc6db5fc55cc8902525e5ea9ec1 Mon Sep 17 00:00:00 2001 From: Michael Dietrich Date: Sat, 30 Jan 2021 19:02:01 +0100 Subject: [PATCH 2/3] Order references to make BAML deterministic From 2c0872939de410ea10b94048509be83264da82e0 Mon Sep 17 00:00:00 2001 From: Felipe da Conceicao Guimaraes Date: Thu, 29 Jul 2021 16:10:04 -0300 Subject: [PATCH 3/3] adding optimization to string comparisons --- .../PresentationFramework/System/Windows/Markup/XmlnsCache.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsCache.cs index 44ad95cdd33..0d8d8ff9139 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlnsCache.cs @@ -94,7 +94,7 @@ private void AddReferencedAssemblies() List interestingAssemblies = new List(); // Load all the assemblies into a list. - foreach(string assemblyName in _assemblyPathTable.Keys.OfType().OrderBy(s => s)) + foreach(string assemblyName in _assemblyPathTable.Keys.OfType().OrderBy(s => s, StringComparer.Ordinal)) { bool hasCacheInfo = true; Assembly assy;