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

System.IO.Pipelines readonly annotation #51810

Closed
wants to merge 3 commits into from

Conversation

hrrrrustic
Copy link
Contributor

This PR is a part of #46675

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

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.

@@ -88,7 +88,7 @@ public void Reset()
_state = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this assignment to _state means that readonly can't be used here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
There is no readonly at Reset(). Github diff merged IsCompletedOrThrow() and Reset() :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, my bad, unhelpful diff window size.

Comment on lines 22 to 25
private readonly CancellationToken CancellationToken => _cancellationTokenRegistration.Token;
#else
private CancellationToken _cancellationToken;
private CancellationToken CancellationToken => _cancellationToken;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If line 22 can be readonly can't 25 also be readonly? they're the same property in different builds.

@jeffhandley jeffhandley marked this pull request as draft April 29, 2021 20:48
@jeffhandley
Copy link
Member

This PR is being marked as a draft per #46675 (comment).

@ghost ghost closed this May 29, 2021
@ghost
Copy link

ghost commented May 29, 2021

Draft Pull Request was automatically closed for inactivity. Please let us know if you'd like to reopen it.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 28, 2021
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants