From 9b2db85a3d6671fd033dc2c690698f6bc6ee1241 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Sun, 30 Dec 2018 01:30:48 -0800 Subject: [PATCH] Fix CoreRT build breaks Signed-off-by: dotnet-bot --- .../shared/System/Collections/Generic/Comparer.cs | 10 ++++------ .../shared/System/Collections/Generic/EqualityComparer.cs | 14 ++++++-------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/System.Private.CoreLib/shared/System/Collections/Generic/Comparer.cs b/src/System.Private.CoreLib/shared/System/Collections/Generic/Comparer.cs index f60d0c5..f7c6cf8 100644 --- a/src/System.Private.CoreLib/shared/System/Collections/Generic/Comparer.cs +++ b/src/System.Private.CoreLib/shared/System/Collections/Generic/Comparer.cs @@ -2,15 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. - -using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.Serialization; namespace System.Collections.Generic { [Serializable] - [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] + [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public abstract partial class Comparer : IComparer, IComparer { // public static Comparer Default is runtime-specific @@ -56,7 +54,7 @@ namespace System.Collections.Generic // means another generic instantiation, which can be costly esp. // for value types. [Serializable] - [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] + [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] // Needs to be public to support binary serialization compatibility public sealed partial class GenericComparer : Comparer where T : IComparable { @@ -80,7 +78,7 @@ namespace System.Collections.Generic } [Serializable] - [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] + [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] // Needs to be public to support binary serialization compatibility public sealed partial class NullableComparer : Comparer where T : struct, IComparable { @@ -104,7 +102,7 @@ namespace System.Collections.Generic } [Serializable] - [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] + [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] // Needs to be public to support binary serialization compatibility public sealed partial class ObjectComparer : Comparer { diff --git a/src/System.Private.CoreLib/shared/System/Collections/Generic/EqualityComparer.cs b/src/System.Private.CoreLib/shared/System/Collections/Generic/EqualityComparer.cs index c04f121..0120477 100644 --- a/src/System.Private.CoreLib/shared/System/Collections/Generic/EqualityComparer.cs +++ b/src/System.Private.CoreLib/shared/System/Collections/Generic/EqualityComparer.cs @@ -2,15 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.Serialization; -using System.Diagnostics; namespace System.Collections.Generic { [Serializable] - [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] + [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public abstract partial class EqualityComparer : IEqualityComparer, IEqualityComparer { // public static EqualityComparer Default is runtime-specific @@ -39,7 +37,7 @@ namespace System.Collections.Generic // The methods in this class look identical to the inherited methods, but the calls // to Equal bind to IEquatable.Equals(T) instead of Object.Equals(Object) [Serializable] - [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] + [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] // Needs to be public to support binary serialization compatibility public sealed partial class GenericEqualityComparer : EqualityComparer where T : IEquatable { @@ -69,7 +67,7 @@ namespace System.Collections.Generic } [Serializable] - [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] + [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] // Needs to be public to support binary serialization compatibility public sealed partial class NullableEqualityComparer : EqualityComparer where T : struct, IEquatable { @@ -97,7 +95,7 @@ namespace System.Collections.Generic } [Serializable] - [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] + [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] // Needs to be public to support binary serialization compatibility public sealed partial class ObjectEqualityComparer : EqualityComparer { @@ -125,7 +123,7 @@ namespace System.Collections.Generic } [Serializable] - [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] + [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] // Needs to be public to support binary serialization compatibility public sealed partial class ByteEqualityComparer : EqualityComparer { @@ -150,7 +148,7 @@ namespace System.Collections.Generic } [Serializable] - [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] + [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] // Needs to be public to support binary serialization compatibility public sealed partial class EnumEqualityComparer : EqualityComparer, ISerializable where T : struct, Enum { -- 2.7.4