From bc2fcd05c0da9f51d497225f9c158c12bfc7e69a Mon Sep 17 00:00:00 2001 From: sakno Date: Thu, 5 Dec 2024 21:06:03 +0200 Subject: [PATCH] Fixed visibility of internal methods --- src/DotNext.IO/IO/RandomAccessStream.Utils.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/DotNext.IO/IO/RandomAccessStream.Utils.cs b/src/DotNext.IO/IO/RandomAccessStream.Utils.cs index 30a72953d..dbba20a43 100644 --- a/src/DotNext.IO/IO/RandomAccessStream.Utils.cs +++ b/src/DotNext.IO/IO/RandomAccessStream.Utils.cs @@ -11,7 +11,7 @@ public partial class RandomAccessStream : IValueTaskSource, IValueTaskSource.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(); @@ -27,7 +27,7 @@ internal ValueTask SubmitWrite(ValueTask writeTask, int bytesWritten) return new(this, source.Version); } - internal ValueTask SubmitRead(ValueTask readTask) + private ValueTask SubmitRead(ValueTask readTask) { this.readTask = readTask.ConfigureAwait(false).GetAwaiter(); if (this.readTask.IsCompleted) @@ -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.GetStatus(short token) => source.GetStatus(token); - public void OnCompleted(Action continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) + void IValueTaskSource.OnCompleted(Action continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) + => source.OnCompleted(continuation, state, token, flags); + + void IValueTaskSource.OnCompleted(Action continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) => source.OnCompleted(continuation, state, token, flags); // write operation