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

hide Obsolete FileStream ctors #52587

Merged
merged 2 commits into from
May 14, 2021

Conversation

adamsitnik
Copy link
Member

@adamsitnik adamsitnik commented May 11, 2021

The constructors that accept IntPtr have been Obsolete for years. When creating FileStream it's really annoying to see all of them listed in IDE. This PR just hides them and IDE ends up suggesting 9 ctors instead of 13 ;)

@adamsitnik adamsitnik added this to the 6.0.0 milestone May 11, 2021
@adamsitnik adamsitnik added this to In progress in System.IO - FileStream via automation May 11, 2021
@ghost
Copy link

ghost commented May 11, 2021

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

Issue Details

The constructors that accept IntPtr have been Obsolete for years. When creating FileStream it's really annoying to see all of them listed in IDE. This PR just hides them.

Author: adamsitnik
Assignees: -
Labels:

area-System.IO

Milestone: 6.0.0

@jkotas
Copy link
Member

jkotas commented May 11, 2021

You need these in reference assembly to actually do anything.

@jkotas
Copy link
Member

jkotas commented May 11, 2021

Also, changes like this typically go through API reviews. There are both upsides and downsides of hidding methods using EditorBrowsable. I know that marking a method with EditorBrowsable is often discussed during API reviews, and the idea is often rejected.

@adamsitnik
Copy link
Member Author

@jkotas thanks for pointing this out, I was not aware of this policy.

We just got the approval: #52446 (comment)

I've updated the ref assembly, PTAL

System.IO - FileStream automation moved this from In progress to Reviewer approved May 14, 2021
@adamsitnik adamsitnik merged commit bfab3e1 into dotnet:main May 14, 2021
System.IO - FileStream automation moved this from Reviewer approved to Done May 14, 2021
@adamsitnik adamsitnik deleted the hideObsoletFileStreamCtors branch May 14, 2021 21:52
@ghost ghost locked as resolved and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants