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

Address .NET 5-specific suggestions for System.Net.Http.Json #34355

Closed
wants to merge 1 commit into from

Conversation

jozkee
Copy link
Member

@jozkee jozkee commented Apr 1, 2020

Follow-up to #33459

@jozkee jozkee added this to the 5.0 milestone Apr 1, 2020
@jozkee jozkee self-assigned this Apr 1, 2020

namespace System.Net.Http.Json
{
internal sealed partial class TranscodingReadStream : Stream
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't need a private implementation for .NET 5; you should contribute this as part of #30260

Copy link
Member Author

Choose a reason for hiding this comment

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

@GrabYourPitchforks are you actively working on that issue, it is marked for 5.0, is that still the plan?
I want to assume that these TranscodingStreams aren't going to be the fix that closes above issue.

In that case, I think it makes more sense if I close this PR and wait for 30260 to close.

Comment on lines +26 to +44
if (buffer == null)
{
throw new ArgumentNullException(nameof(buffer));
}

if (offset < 0)
{
throw new ArgumentOutOfRangeException(nameof(offset));
}

if (count < 0)
{
throw new ArgumentOutOfRangeException(nameof(count));
}

if (buffer.Length - offset < count)
{
throw new ArgumentException(SR.Argument_InvalidOffLen);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The Memory ctor performs these checks; shouldn't need them here unless parameter names are different.

@jozkee jozkee closed this Apr 13, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
@jozkee jozkee deleted the httpjson_netcoreapp branch March 24, 2021 19:36
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.

2 participants