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: Pipe.Deconstruct #26791

Open
AArnott opened this issue Jul 12, 2018 · 5 comments
Open

API Proposal: Pipe.Deconstruct #26791

AArnott opened this issue Jul 12, 2018 · 5 comments
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.IO.Pipelines backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity
Milestone

Comments

@AArnott
Copy link
Contributor

AArnott commented Jul 12, 2018

A Deconstruct extension method should be offered for the System.IO.Pipelines.Pipe class so that someone can simply assign the reader and writer directly:

var (reader, writer) = new Pipe();
@davidfowl
Copy link
Member

I like it.

@pakrym
Copy link
Contributor

pakrym commented Nov 30, 2018

@terrajobst, what are the guidelines for adding deconstruct methods?

@GSPP
Copy link

GSPP commented Dec 1, 2018

Is there a consensus on when to offer deconstruction in general? It can lead to confusing APIs and code. Like operator overloading it has really nice uses but it's easy to create unclear code where the only benefit is to save a few characters.

@gfoidl
Copy link
Member

gfoidl commented Dec 1, 2018

... and deconstructing with extension methods is trivial.

But for Pipe I believe it is a common enough case to "assign the reader and writer directly", so the deconstruct method would be nice.

@pakrym pakrym removed their assignment Feb 11, 2019
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 5.0 milestone Jan 31, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@BrennanConroy BrennanConroy modified the milestones: 5.0.0, Future Jul 8, 2020
@halter73 halter73 removed the untriaged New issue has not been triaged by the area owner label Jul 8, 2020
Copy link
Contributor

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

@dotnet-policy-service dotnet-policy-service bot added backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.IO.Pipelines backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity
Projects
None yet
Development

No branches or pull requests

9 participants