Skip to content

Commit

Permalink
Amend release 5.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sakno committed Dec 5, 2024
1 parent 754bc9f commit eaf9902
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/DotNext.IO/IO/RandomAccessStream.Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class RandomAccessStream : IValueTaskSource, IValueTaskSource<int
private ConfiguredValueTaskAwaitable<int>.ConfiguredValueTaskAwaiter readTask;
private Action? readCallback, writeCallback;

internal ValueTask SubmitWrite(ValueTask writeTask, int bytesWritten)
private ValueTask SubmitWrite(ValueTask writeTask, int bytesWritten)
{
this.bytesWritten = bytesWritten;
this.writeTask = writeTask.ConfigureAwait(false).GetAwaiter();
Expand All @@ -27,7 +27,7 @@ internal ValueTask SubmitWrite(ValueTask writeTask, int bytesWritten)
return new(this, source.Version);
}

internal ValueTask<int> SubmitRead(ValueTask<int> readTask)
private ValueTask<int> SubmitRead(ValueTask<int> readTask)
{
this.readTask = readTask.ConfigureAwait(false).GetAwaiter();
if (this.readTask.IsCompleted)
Expand Down Expand Up @@ -79,9 +79,14 @@ private void OnReadCompleted()
source.SetResult(bytesRead);
}

public ValueTaskSourceStatus GetStatus(short token) => source.GetStatus(token);
ValueTaskSourceStatus IValueTaskSource.GetStatus(short token) => source.GetStatus(token);

ValueTaskSourceStatus IValueTaskSource<int>.GetStatus(short token) => source.GetStatus(token);

public void OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
void IValueTaskSource.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
=> source.OnCompleted(continuation, state, token, flags);

void IValueTaskSource<int>.OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
=> source.OnCompleted(continuation, state, token, flags);

// write operation
Expand Down

0 comments on commit eaf9902

Please sign in to comment.