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

[Cookie] CookieCollection should implement ICollection<Cookie> #24973

Closed
geoffkizer opened this issue Feb 8, 2018 · 8 comments
Closed

[Cookie] CookieCollection should implement ICollection<Cookie> #24973

geoffkizer opened this issue Feb 8, 2018 · 8 comments
Assignees
Labels
api-approved API was approved in API review, it can be implemented area-System.Net Hackathon Issues picked for Hackathon help wanted [up-for-grabs] Good issue for external contributors
Milestone

Comments

@geoffkizer
Copy link
Contributor

It implements ICollection, but not ICollection<Cookie>.

Proposed API

    public class CookieCollection : ICollection, ICollection<Cookie>, IReadOnlyCollection<Cookie>
    {
       
        public bool Contains(Cookie c) { }
        
        public void Clear() { }
       
        public bool Remove(Cookie c) { }
        
        public IEnumerator<Cookie> GetEnumerator() { }
       
        IEnumerator IEnumerable.GetEnumerator() { }
     }

@karelz

@davidsh
Copy link
Contributor

davidsh commented Feb 8, 2018

Does this need to be reflected in the ref folder, i.e. is this an API change also?

@davidsh
Copy link
Contributor

davidsh commented Feb 8, 2018

cc: @stephentoub

@geoffkizer
Copy link
Contributor Author

Yes. It's basically a feature request, and not high priority. But it seems like we should do it.

@rvhuang
Copy link

rvhuang commented Feb 9, 2018

Aye. It's 2018 already and I see no reason why it shouldn't implement generic collection interface.

@caesar-chen caesar-chen changed the title CookieCollection should implement ICollection<Cookie> [Cookie] CookieCollection should implement ICollection<Cookie> May 8, 2018
@terrajobst
Copy link
Member

terrajobst commented May 22, 2018

Video

Looks good but for consistency we should also implement IReadOnlyCollection<>.

@karelz
Copy link
Member

karelz commented May 22, 2018

Proposal updated.
Should be fairly simple to do. Adding new API into ref (netcore22) will be the trickiest part.

@karelz
Copy link
Member

karelz commented May 28, 2018

@yevgeniyredko mentioned on gitter he wants to pick this one.
I sent you collaborator invite, so that we can assign the issue to you. Ping me once you accept. Assigning to myself temporarily.
Pro tip: Becoming collaborator will automatically subscribe you to all repo notifications (500+ daily). We recommend to switch repo to "Not Watching" - that will send you notifications only when you are mentioned, explicitly subscribed or assigned issues.

@karelz karelz self-assigned this May 28, 2018
@yevgeniyredko
Copy link
Member

@karelz accepted your invite.

@karelz karelz assigned yevgeniyredko and unassigned karelz May 28, 2018
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 3.0 milestone Jan 31, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 18, 2020
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.Net Hackathon Issues picked for Hackathon help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
Development

No branches or pull requests

7 participants