-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Added ConcurrentDictionary.Comparer property #47787
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @eiriktsarpalis Issue Detailsfix #31350
|
In video said that it is a copy of the Dictionary. It no works cause interface IInternalStringEqualityComparer placed in CoreLIb - internal. What to do? |
...ries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs
Outdated
Show resolved
Hide resolved
...ries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs
Show resolved
Hide resolved
@@ -1051,6 +1051,8 @@ private bool TryAddInternal(TKey key, int? nullableHashcode, TValue value, bool | |||
private static void ThrowKeyNotFoundException(TKey key) => | |||
throw new KeyNotFoundException(SR.Format(SR.Arg_KeyNotFoundWithKey, key.ToString())); | |||
|
|||
public IEqualityComparer<TKey> Comparer => _comparer ?? _defaultComparer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: please add an xml comment to help seed the documentation for the new member.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@eiriktsarpalis, the member still needed XML docs added. Do you want to add that? |
My bad, created a new PR adding docs. |
fix #31350