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

Add ConcurrentDictionary.Comparer property #31350

Closed
mikernet opened this issue Oct 30, 2019 · 3 comments · Fixed by #47787
Closed

Add ConcurrentDictionary.Comparer property #31350

mikernet opened this issue Oct 30, 2019 · 3 comments · Fixed by #47787
Assignees
Labels
api-approved API was approved in API review, it can be implemented area-System.Collections help wanted [up-for-grabs] Good issue for external contributors
Milestone

Comments

@mikernet
Copy link
Contributor

It would be useful to expose this as a getter property. I believe all other BCL collections that accept comparers expose them as properties (i.e. Dictionary<,>.Comparer, HashSet<>.Comparer).

@scalablecory
Copy link
Contributor

Makes sense from a consistency standpoint.

@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@layomia layomia added this to the Future milestone Jun 24, 2020
@layomia layomia removed the untriaged New issue has not been triaged by the area owner label Jun 24, 2020
@eiriktsarpalis eiriktsarpalis 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 labels Dec 14, 2020
@eiriktsarpalis eiriktsarpalis self-assigned this Dec 14, 2020
@eiriktsarpalis
Copy link
Member

Proposed API:

namespace System.Collections.Concurrent
{
    public partial class ConcurrentDictionary<TKey, TValue>
    {
+         public IEqualityComparer<TKey> Comparer { get; }
    }
}

@terrajobst terrajobst 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 Feb 2, 2021
@terrajobst
Copy link
Contributor

terrajobst commented Feb 2, 2021

Video

  • Looks good as proposed
namespace System.Collections.Concurrent
{
    public partial class ConcurrentDictionary<TKey, TValue>
    {
        public IEqualityComparer<TKey> Comparer { get; }
    }
}

@eiriktsarpalis eiriktsarpalis added the help wanted [up-for-grabs] Good issue for external contributors label Feb 2, 2021
I-SER-I added a commit to I-SER-I/runtime that referenced this issue Feb 2, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 2, 2021
eiriktsarpalis pushed a commit that referenced this issue Feb 3, 2021
* fix #31350

* fix ref file

* fix getter

* added tests
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 3, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Mar 5, 2021
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-System.Collections help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants