-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Rename new Stream.Read/Write{Async} Span/Memory arguments to buffer #23889
Comments
@stephentoub Presumably we still want this for 2.1, right? - public virtual ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default(CancellationToken))
- public virtual ValueTask WriteAsync(ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default(CancellationToken))
+ public virtual ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default(CancellationToken))
+ public virtual ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default(CancellationToken)) @danmosemsft this is an easy one |
Let's roll this in with any other consistentification we decide on tomorrow. |
Confirmed that we want to match existing param names. |
Jeremy have you already started with this? That should be quickly done. Should I help? |
@stephentoub is anything left here ? Coreclr and Corefx are merged. Corert doesnt have anything except the common folder |
I still see some uses of source/destination after your changes:
so it'd be good to clean those up, too. If the only streams in corert are in shared, then there's nothing special to be done there. Thanks. |
We'd previously decided to name these source/destination, but we also have an overriding principle that we should adhere to names used in existing overloads if possible, and we should only use source/destination to help in cases where we need to make the direction clear. Thus we should update the names in these new overloads before we ship them.
The text was updated successfully, but these errors were encountered: