Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API Proposal]: Make DependencyModel.Dependency readonly and implement IEquatable<> #56082

Closed
hrrrrustic opened this issue Jul 21, 2021 · 7 comments · Fixed by #57599
Closed
Labels
api-approved API was approved in API review, it can be implemented area-DependencyModel
Milestone

Comments

@hrrrrustic
Copy link
Contributor

Background and motivation

Similar to #31996 and #2127

The current implementation looks like

namespace Microsoft.Extensions.DependencyModel
{
    public struct Dependency
    {
         // for readonly proposal
         public string Name { get; }
         public string Version { get; }

         // for IEquatable<> proposal
         public bool Equals(Dependency other);
         public override bool Equals(object obj); // common pattern with is T t && Equals(t)
         public override int GetHashCode();
    }
}

So, all required members for IEquatable<> exist and properties aren't settable

API Proposal

namespace Microsoft.Extensions.DependencyModel
{
-    public struct Dependency {}
+    public readonly struct Dependency : IEquatable<Dependency> {}
}

The main point here is that nothing will be changed in the implementation as it already satisfied for these changes

API Usage

There are already some usages in HashSet<> where new EqualityComparer will be used

and some in dotnet/sdk

Also Dependency is public, so it might be useful for someone else 😄

Risks

None?

@hrrrrustic hrrrrustic added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Jul 21, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added area-DependencyModel untriaged New issue has not been triaged by the area owner labels Jul 21, 2021
@ghost
Copy link

ghost commented Jul 21, 2021

Tagging subscribers to this area: @eerhardt
See info in area-owners.md if you want to be subscribed.

Issue Details

Background and motivation

Similar to #31996 and #2127

The current implementation looks like

namespace Microsoft.Extensions.DependencyModel
{
    public struct Dependency
    {
         // for readonly proposal
         public string Name { get; }
         public string Version { get; }

         // for IEquatable<> proposal
         public bool Equals(Dependency other);
         public override bool Equals(object obj); // common pattern with is T t && Equals(t)
         public override int GetHashCode();
    }
}

So, all required members for IEquatable<> exist and properties aren't settable

API Proposal

namespace Microsoft.Extensions.DependencyModel
{
-    public struct Dependency {}
+    public readonly struct Dependency : IEquatable<Dependency> {}
}

The main point here is that nothing will be changed in the implementation as it already satisfied for these changes

API Usage

There are already some usages in HashSet<> where new EqualityComparer will be used

and some in dotnet/sdk

Also Dependency is public, so it might be useful for someone else 😄

Risks

None?

Author: hrrrrustic
Assignees: -
Labels:

api-suggestion, area-DependencyModel, untriaged

Milestone: -

@eerhardt
Copy link
Member

Thanks for the suggestion. Seems reasonable to me.

@eerhardt eerhardt added this to the Future milestone Jul 21, 2021
@eerhardt eerhardt added api-ready-for-review API is ready for review, it is NOT ready for implementation and removed api-suggestion Early API idea and discussion, it is NOT ready for implementation untriaged New issue has not been triaged by the area owner labels Jul 21, 2021
@bartonjs
Copy link
Member

bartonjs commented Aug 17, 2021

Video

Looks good as proposed.

namespace Microsoft.Extensions.DependencyModel
{
-    public struct Dependency {}
+    public readonly struct Dependency : IEquatable<Dependency> {}
}

@bartonjs bartonjs added api-approved API was approved in API review, it can be implemented and removed api-ready-for-review API is ready for review, it is NOT ready for implementation labels Aug 17, 2021
@stephentoub
Copy link
Member

stephentoub commented Aug 17, 2021

@bartonjs, @terrajobst, we explicitly disable CA1066 because we have a bunch of types that don't do this "correctly":

# CA1066: Implement IEquatable when overriding Object.Equals
dotnet_diagnostic.CA1066.severity = none

Should we holistically make a pass through all of them rather than continuing with these one-offs?

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Aug 17, 2021
@terrajobst
Copy link
Member

Hmm, maybe instead of disabling that rule we should just pragma suppress the files that host these types?

@stephentoub
Copy link
Member

stephentoub commented Aug 17, 2021

We could... for reference, here are the resulting warnings if it's enabled currently:

68 Warning(s)
D:\repos\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs(18,26): warning CA1066: Type System.RuntimeTypeHandle should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs(817,26): warning CA1066: Type System.RuntimeMethodHandle should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs(1142,26): warning CA1066: Type System.RuntimeFieldHandle should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\ArraySegment.cs(29,28): warning CA1066: Type System.ArraySegment<T> should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs(1249,26): warning CA1066: Type System.ModuleHandle should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Nullable.cs(16,27): warning CA1066: Type System.Nullable<T> should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\HashCode.cs(55,19): warning CA1066: Type System.HashCode should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs(26,28): warning CA1066: Type System.UIntPtr should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs(25,28): warning CA1066: Type System.IntPtr should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\coreclr\System.Private.CoreLib\src\System\Diagnostics\SymbolStore\Token.cs(16,21): warning CA1066: Type System.Diagnostics.SymbolStore.SymbolToken should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventDescriptor.cs(18,21): warning CA1066: Type System.Diagnostics.Tracing.EventDescriptor should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\CancellationToken.cs(30,28): warning CA1066: Type System.Threading.CancellationToken should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.ThreadCounts.cs(14,24): warning CA1066: Type System.Threading.PortableThreadPool.ThreadCounts should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WorkerTracking.cs(61,24): warning CA1066: Type System.Threading.PortableThreadPool.CountsOfThreadsProcessingUserCallbacks should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLifoSemaphore.cs(245,24): warning CA1066: Type System.Threading.LowLevelLifoSemaphore.Counts should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeNamedArgument.cs(6,36): warning CA1066: Type System.Reflection.CustomAttributeNamedArgument should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MdImport.cs(197,30): warning CA1066: Type System.Reflection.MetadataImport should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\RuntimeCustomAttributeData.cs(479,36): warning CA1066: Type System.Reflection.CustomAttributeTypedArgument should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ArrayWithOffset.cs(9,28): warning CA1066: Type System.Runtime.InteropServices.ArrayWithOffset should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\StreamingContext.cs(8,28): warning CA1066: Type System.Runtime.Serialization.StreamingContext should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.CoreCLR.cs(11,27): warning CA1066: Type System.Runtime.InteropServices.GCHandle should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
D:\repos\runtime\src\libraries\System.Collections.Specialized\src\System\Collections\Specialized\BitVector32.cs(13,19): warning CA1066: Type System.Collections.Specialized.BitVector32 should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Collections.Specialized\src\System.Collections.Specialized.csproj]
D:\repos\runtime\src\libraries\System.Collections.Specialized\src\System\Collections\Specialized\BitVector32.cs(185,32): warning CA1066: Type System.Collections.Specialized.BitVector32.Section should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Collections.Specialized\src\System.Collections.Specialized.csproj]
D:\repos\runtime\src\libraries\System.ComponentModel.TypeConverter\src\System\ComponentModel\InterlockedBitVector32.cs(14,21): warning CA1066: Type System.ComponentModel.InterlockedBitVector32 should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.ComponentModel.TypeConverter\src\System.ComponentModel.TypeConverter.csproj]
D:\repos\runtime\src\libraries\System.ComponentModel.TypeConverter\src\System\ComponentModel\Design\Serialization\MemberRelationshipService.cs(156,24): warning CA1066: Type System.ComponentModel.Design.Serialization.MemberRelationshipService.RelationshipEntry should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.ComponentModel.TypeConverter\src\System.ComponentModel.TypeConverter.csproj]
D:\repos\runtime\src\libraries\System.ComponentModel.TypeConverter\src\System\ComponentModel\Design\Serialization\MemberRelationshipService.cs(194,28): warning CA1066: Type System.ComponentModel.Design.Serialization.MemberRelationship should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.ComponentModel.TypeConverter\src\System.ComponentModel.TypeConverter.csproj]
D:\repos\runtime\src\libraries\System.Linq.Expressions\src\System\Linq\Expressions\Interpreter\LocalVariables.cs(47,30): warning CA1066: Type System.Linq.Expressions.Interpreter.LocalDefinition should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Linq.Expressions\src\System.Linq.Expressions.csproj]
D:\repos\runtime\src\libraries\System.Net.Sockets\src\System\Net\Sockets\IPPacketInformation.cs(8,19): warning CA1066: Type System.Net.Sockets.IPPacketInformation should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Net.Sockets\src\System.Net.Sockets.csproj]
D:\repos\runtime\src\libraries\System.Private.Xml\src\System\Xml\BinaryXml\XmlBinaryReader.cs(62,25): warning CA1066: Type System.Xml.XmlSqlBinaryReader.QName should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Private.Xml\src\System.Private.Xml.csproj]
D:\repos\runtime\src\libraries\System.Private.Xml\src\System\Xml\Xsl\Pair.cs(10,21): warning CA1066: Type System.Xml.Xsl.Int32Pair should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Private.Xml\src\System.Private.Xml.csproj]
D:\repos\runtime\src\libraries\System.Private.Xml\src\System\Xml\Xsl\XmlQueryCardinality.cs(14,21): warning CA1066: Type System.Xml.Xsl.XmlQueryCardinality should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Private.Xml\src\System.Private.Xml.csproj]
D:\repos\runtime\src\libraries\System.Transactions.Local\src\System\Transactions\TransactionOptions.cs(8,19): warning CA1066: Type System.Transactions.TransactionOptions should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Transactions.Local\src\System.Transactions.Local.csproj]
D:\repos\runtime\src\libraries\System.Collections.Immutable\src\System\Collections\Immutable\ImmutableHashSet_1.HashBucket.cs(33,34): warning CA1066: Type System.Collections.Immutable.ImmutableHashSet<T>.HashBucket should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Collections.Immutable\src\System.Collections.Immutable.csproj]
D:\repos\runtime\src\libraries\System.Collections.Immutable\src\System\Collections\Immutable\ImmutableDictionary_2.HashBucket.cs(18,34): warning CA1066: Type System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.HashBucket should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Collections.Immutable\src\System.Collections.Immutable.csproj]
D:\repos\runtime\src\libraries\System.Threading\src\System\Threading\LockCookie.cs(12,19): warning CA1066: Type System.Threading.LockCookie should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Threading\src\System.Threading.csproj]
D:\repos\runtime\src\libraries\System.Private.Xml\src\System\Xml\BinaryXml\XmlBinaryReader.cs(62,25): warning CA1066: Type System.Xml.XmlSqlBinaryReader.QName should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Private.Xml\src\System.Private.Xml.csproj]
D:\repos\runtime\src\libraries\System.Private.Xml\src\System\Xml\Xsl\Pair.cs(10,21): warning CA1066: Type System.Xml.Xsl.Int32Pair should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Private.Xml\src\System.Private.Xml.csproj]
D:\repos\runtime\src\libraries\System.Private.Xml\src\System\Xml\Xsl\XmlQueryCardinality.cs(14,21): warning CA1066: Type System.Xml.Xsl.XmlQueryCardinality should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Private.Xml\src\System.Private.Xml.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLDateTime.cs(24,19): warning CA1066: Type System.Data.SqlTypes.SqlDateTime should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\Selection.cs(12,30): warning CA1066: Type System.Data.IndexField should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLDouble.cs(22,19): warning CA1066: Type System.Data.SqlTypes.SqlDouble should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLGuid.cs(19,19): warning CA1066: Type System.Data.SqlTypes.SqlGuid should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLInt16.cs(20,19): warning CA1066: Type System.Data.SqlTypes.SqlInt16 should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLInt32.cs(20,19): warning CA1066: Type System.Data.SqlTypes.SqlInt32 should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLInt64.cs(21,19): warning CA1066: Type System.Data.SqlTypes.SqlInt64 should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLSingle.cs(20,19): warning CA1066: Type System.Data.SqlTypes.SqlSingle should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLString.cs(37,19): warning CA1066: Type System.Data.SqlTypes.SqlString should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLMoney.cs(24,19): warning CA1066: Type System.Data.SqlTypes.SqlMoney should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLBinary.cs(15,19): warning CA1066: Type System.Data.SqlTypes.SqlBinary should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLByte.cs(21,19): warning CA1066: Type System.Data.SqlTypes.SqlByte should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLBoolean.cs(21,19): warning CA1066: Type System.Data.SqlTypes.SqlBoolean should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\DataKey.cs(8,30): warning CA1066: Type System.Data.DataKey should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Data.Common\src\System\Data\SQLTypes\SQLDecimal.cs(21,19): warning CA1066: Type System.Data.SqlTypes.SqlDecimal should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Data.Common\src\System.Data.Common.csproj]
D:\repos\runtime\src\libraries\System.Diagnostics.StackTrace\src\System\Diagnostics\SymbolStore\SymbolToken.cs(8,28): warning CA1066: Type System.Diagnostics.SymbolStore.SymbolToken should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Diagnostics.StackTrace\src\System.Diagnostics.StackTrace.csproj]
D:\repos\runtime\src\libraries\System.ComponentModel.Composition\src\System\ComponentModel\Composition\ReflectionModel\LazyMemberInfo.cs(11,19): warning CA1066: Type System.ComponentModel.Composition.ReflectionModel.LazyMemberInfo should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.ComponentModel.Composition\src\System.ComponentModel.Composition.csproj]
D:\repos\runtime\src\libraries\System.Drawing.Common\src\System\Drawing\CharacterRange.cs(10,19): warning CA1066: Type System.Drawing.CharacterRange should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Drawing.Common\src\System.Drawing.Common.csproj]
D:\repos\runtime\src\libraries\System.Drawing.Common\src\System\Drawing\Printing\TriState.cs(6,38): warning CA1066: Type System.Drawing.Printing.TriState should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Drawing.Common\src\System.Drawing.Common.csproj]
D:\repos\runtime\src\libraries\System.Text.Encodings.Web\src\Polyfills\System.Text.Rune.netstandard20.cs(17,30): warning CA1066: Type System.Text.Rune should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj]
D:\repos\runtime\src\libraries\System.Speech\src\Internal\Synthesis\EngineSiteSapi.cs(180,21): warning CA1066: Type System.Speech.Internal.Synthesis.SpeechEventSapi should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Speech\src\System.Speech.csproj]
D:\repos\runtime\src\libraries\System.ServiceProcess.ServiceController\src\System\ServiceProcess\SessionChangeDescription.cs(8,28): warning CA1066: Type System.ServiceProcess.SessionChangeDescription should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.ServiceProcess.ServiceController\src\System.ServiceProcess.ServiceController.csproj]
D:\repos\runtime\artifacts\obj\System.ServiceProcess.ServiceController\netstandard2.0-Debug\System.ServiceProcess.ServiceController.notsupported.cs(129,36): warning CA1066: Type System.ServiceProcess.SessionChangeDescription should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.ServiceProcess.ServiceController\src\System.ServiceProcess.ServiceController.csproj]
D:\repos\runtime\src\libraries\Microsoft.Extensions.Logging.Abstractions\src\EventId.cs(11,28): warning CA1066: Type Microsoft.Extensions.Logging.EventId should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj]
D:\repos\runtime\src\libraries\Microsoft.Extensions.Logging.Abstractions\src\EventId.cs(11,28): warning CA1066: Type Microsoft.Extensions.Logging.EventId should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj]
D:\repos\runtime\artifacts\obj\System.Drawing.Common\net6.0-Debug\System.Drawing.Common.notsupported.cs(229,27): warning CA1066: Type System.Drawing.CharacterRange should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Drawing.Common\src\System.Drawing.Common.csproj]
D:\repos\runtime\src\libraries\Microsoft.Extensions.DependencyModel\src\Dependency.cs(9,19): warning CA1066: Type Microsoft.Extensions.DependencyModel.Dependency should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\Microsoft.Extensions.DependencyModel\src\Microsoft.Extensions.DependencyModel.csproj]
D:\repos\runtime\src\libraries\System.Diagnostics.PerformanceCounter\src\System\Diagnostics\CounterSample.cs(9,28): warning CA1066: Type System.Diagnostics.CounterSample should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Diagnostics.PerformanceCounter\src\System.Diagnostics.PerformanceCounter.csproj]
D:\repos\runtime\src\libraries\System.Runtime.Caching\src\System\Runtime\Caching\CacheExpires.cs(16,21): warning CA1066: Type System.Runtime.Caching.ExpiresEntryRef should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Runtime.Caching\src\System.Runtime.Caching.csproj]
D:\repos\runtime\src\libraries\System.Runtime.Caching\src\System\Runtime\Caching\CacheUsage.cs(16,21): warning CA1066: Type System.Runtime.Caching.UsageEntryRef should implement IEquatable<T> because it overrides Equals [D:\repos\runtime\src\libraries\System.Runtime.Caching\src\System.Runtime.Caching.csproj]
    68 Warning(s)

@terrajobst
Copy link
Member

68 types doesn't seem too bad. But yeah.

@ghost ghost closed this as completed in #57599 Aug 19, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Aug 19, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 19, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-approved API was approved in API review, it can be implemented area-DependencyModel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants