From 53031b73653545dda1063d4f81be3c99e6b080f0 Mon Sep 17 00:00:00 2001 From: Jonathon Marolf Date: Fri, 26 Apr 2019 08:28:16 -0700 Subject: [PATCH 1/3] implement GetHashCode instead of throwing --- .../PropPages/WPF/ApplicationPropPageVBWPF.vb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.VisualStudio.Editors/PropPages/WPF/ApplicationPropPageVBWPF.vb b/src/Microsoft.VisualStudio.Editors/PropPages/WPF/ApplicationPropPageVBWPF.vb index d803b8ebf09..cc2d2300c2b 100644 --- a/src/Microsoft.VisualStudio.Editors/PropPages/WPF/ApplicationPropPageVBWPF.vb +++ b/src/Microsoft.VisualStudio.Editors/PropPages/WPF/ApplicationPropPageVBWPF.vb @@ -930,7 +930,7 @@ Namespace Microsoft.VisualStudio.Editors.PropertyPages.WPF End Function Public Overrides Function GetHashCode() As Integer - Throw New NotImplementedException() + Return -1937169414 + EqualityComparer(Of String).Default.GetHashCode(Value.ToLowerInvariant) End Function End Class @@ -964,7 +964,10 @@ Namespace Microsoft.VisualStudio.Editors.PropertyPages.WPF End Function Public Overrides Function GetHashCode() As Integer - Throw New NotImplementedException() + Dim hashCode = 870297925 + hashCode = hashCode * -1521134295 + MyBase.GetHashCode() + hashCode = hashCode * -1521134295 + IsEquivalentToSubMain.GetHashCode() + Return hashCode End Function End Class From dbc31e420e5f8486367ca30dcd69b67fea5c86fc Mon Sep 17 00:00:00 2001 From: Jonathon Marolf Date: Fri, 26 Apr 2019 18:19:26 -0700 Subject: [PATCH 2/3] disable NU5125 --- src/Directory.Build.props | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 3ee14a56a4b..715a48ed390 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -34,6 +34,8 @@ false + + $(NoWarn);NU5125 From 0299cb7687662cbc0352838c15d12866f91923bd Mon Sep 17 00:00:00 2001 From: Jonathon Marolf Date: Mon, 29 Apr 2019 13:04:56 -0700 Subject: [PATCH 3/3] use OrdinalIgnoreCase instead of ToLowerInvariant --- .../PropPages/WPF/ApplicationPropPageVBWPF.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.VisualStudio.Editors/PropPages/WPF/ApplicationPropPageVBWPF.vb b/src/Microsoft.VisualStudio.Editors/PropPages/WPF/ApplicationPropPageVBWPF.vb index cc2d2300c2b..1d9b3faf857 100644 --- a/src/Microsoft.VisualStudio.Editors/PropPages/WPF/ApplicationPropPageVBWPF.vb +++ b/src/Microsoft.VisualStudio.Editors/PropPages/WPF/ApplicationPropPageVBWPF.vb @@ -930,7 +930,7 @@ Namespace Microsoft.VisualStudio.Editors.PropertyPages.WPF End Function Public Overrides Function GetHashCode() As Integer - Return -1937169414 + EqualityComparer(Of String).Default.GetHashCode(Value.ToLowerInvariant) + Return -1937169414 + StringComparer.OrdinalIgnoreCase.GetHashCode(Value) End Function End Class