Skip to content

Commit 7fe029c

Browse files
committed
Added default parameter values
1 parent 11a90dd commit 7fe029c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/DotNext.IO/Buffers/IBufferedReader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public interface IBufferedReader : IBufferedChannel
2929
/// <exception cref="ObjectDisposedException">The reader has been disposed.</exception>
3030
/// <exception cref="InternalBufferOverflowException">Internal buffer has no free space.</exception>
3131
/// <exception cref="OperationCanceledException">The operation has been canceled.</exception>
32-
ValueTask<bool> ReadAsync(CancellationToken token);
32+
ValueTask<bool> ReadAsync(CancellationToken token = default);
3333

3434
/// <summary>
3535
/// Reads the block of the memory.
@@ -39,7 +39,7 @@ public interface IBufferedReader : IBufferedChannel
3939
/// <returns>The number of bytes copied to <paramref name="destination"/>.</returns>
4040
/// <exception cref="ObjectDisposedException">The reader has been disposed.</exception>
4141
/// <exception cref="OperationCanceledException">The operation has been canceled.</exception>
42-
async ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken token)
42+
async ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken token = default)
4343
{
4444
var result = 0;
4545
for (int bytesRead; result < destination.Length; result += bytesRead, destination = destination.Slice(bytesRead))

src/DotNext.IO/Buffers/IBufferedWriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public interface IBufferedWriter : IBufferedChannel, IBufferWriter<byte>
3030
/// <returns>The task representing asynchronous result.</returns>
3131
/// <exception cref="ObjectDisposedException">The writer has been disposed.</exception>
3232
/// <exception cref="OperationCanceledException">The operation has been canceled.</exception>
33-
ValueTask WriteAsync(CancellationToken token);
33+
ValueTask WriteAsync(CancellationToken token = default);
3434

3535
/// <summary>
3636
/// Writes the data to the underlying storage through the buffer.
@@ -40,7 +40,7 @@ public interface IBufferedWriter : IBufferedChannel, IBufferWriter<byte>
4040
/// <returns>The task representing asynchronous result.</returns>
4141
/// <exception cref="ObjectDisposedException">The object has been disposed.</exception>
4242
/// <exception cref="OperationCanceledException">The operation has been canceled.</exception>
43-
async ValueTask WriteAsync(ReadOnlyMemory<byte> input, CancellationToken token)
43+
async ValueTask WriteAsync(ReadOnlyMemory<byte> input, CancellationToken token = default)
4444
{
4545
for (int bytesWritten; !input.IsEmpty; input = input.Slice(bytesWritten))
4646
{

0 commit comments

Comments
 (0)