-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Address all IDE0251 warnings and naming inconsistencies. #8617
Conversation
private readonly INamedTypeSymbol? DateOnly; | ||
private readonly INamedTypeSymbol DateTimeOffset; | ||
private readonly INamedTypeSymbol? TimeOnly; | ||
private INamedTypeSymbol _uri; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think "fixing" these helped in any way. And why was readonly
removed in the process?
@@ -89,7 +89,7 @@ private void Resize(int sizeHint) | |||
} | |||
|
|||
/// <inheritdoc /> | |||
public void Dispose() | |||
public readonly void Dispose() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is misleading and should be reverted - the struct is actually unusable after Dispose
is called.
@@ -178,13 +178,13 @@ public void Dispose() | |||
/// Gets the position. | |||
/// </summary> | |||
/// <value>The position.</value> | |||
public int Position => _previousBuffersSize + _bufferPos; | |||
public readonly int Position => _previousBuffersSize + _bufferPos; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's quite pointless to add readonly
modifiers to methods on ref structs
...
Supersedes part of #8471
Microsoft Reviewers: Open in CodeFlow