@@ -138,7 +138,7 @@ public override void Write(byte[] buffer, int offset, int count)
138
138
/// <returns>
139
139
/// A task that represents the asynchronous copy operation.
140
140
/// </returns>
141
- public override async Task CopyToAsync ( Stream destination , int bufferSize , CancellationToken cancellationToken = default ( CancellationToken ) )
141
+ public override async Task CopyToAsync ( Stream destination , int bufferSize , CancellationToken cancellationToken = default )
142
142
{
143
143
if ( bufferLength > 0 )
144
144
{
@@ -157,7 +157,7 @@ public override void Write(byte[] buffer, int offset, int count)
157
157
/// <returns>
158
158
/// A task that represents the asynchronous flush operation.
159
159
/// </returns>
160
- public override Task FlushAsync ( CancellationToken cancellationToken = default ( CancellationToken ) )
160
+ public override Task FlushAsync ( CancellationToken cancellationToken = default )
161
161
{
162
162
return baseStream . FlushAsync ( cancellationToken ) ;
163
163
}
@@ -182,7 +182,7 @@ public override void Write(byte[] buffer, int offset, int count)
182
182
/// less than the requested number, or it can be 0 (zero)
183
183
/// if the end of the stream has been reached.
184
184
/// </returns>
185
- public override async Task < int > ReadAsync ( byte [ ] buffer , int offset , int count , CancellationToken cancellationToken = default ( CancellationToken ) )
185
+ public override async Task < int > ReadAsync ( byte [ ] buffer , int offset , int count , CancellationToken cancellationToken = default )
186
186
{
187
187
if ( bufferLength == 0 )
188
188
{
@@ -228,7 +228,7 @@ public override int ReadByte()
228
228
/// <param name="index">The index.</param>
229
229
/// <param name="cancellationToken">The cancellation token.</param>
230
230
/// <returns></returns>
231
- public async Task < int > PeekByteAsync ( int index , CancellationToken cancellationToken = default ( CancellationToken ) )
231
+ public async Task < int > PeekByteAsync ( int index , CancellationToken cancellationToken = default )
232
232
{
233
233
if ( Available <= index )
234
234
{
@@ -258,7 +258,7 @@ public override int ReadByte()
258
258
/// <param name="index">The index.</param>
259
259
/// <param name="cancellationToken">The cancellation token.</param>
260
260
/// <returns></returns>
261
- public async Task < int > PeekBytesAsync ( byte [ ] buffer , int offset , int index , int size , CancellationToken cancellationToken = default ( CancellationToken ) )
261
+ public async Task < int > PeekBytesAsync ( byte [ ] buffer , int offset , int index , int size , CancellationToken cancellationToken = default )
262
262
{
263
263
if ( Available <= index )
264
264
{
@@ -324,7 +324,7 @@ public byte ReadByteFromBuffer()
324
324
/// A task that represents the asynchronous write operation.
325
325
/// </returns>
326
326
[ DebuggerStepThrough ]
327
- public override async Task WriteAsync ( byte [ ] buffer , int offset , int count , CancellationToken cancellationToken = default ( CancellationToken ) )
327
+ public override async Task WriteAsync ( byte [ ] buffer , int offset , int count , CancellationToken cancellationToken = default )
328
328
{
329
329
OnDataWrite ( buffer , offset , count ) ;
330
330
@@ -484,7 +484,7 @@ public bool FillBuffer()
484
484
/// </summary>
485
485
/// <param name="cancellationToken">The cancellation token.</param>
486
486
/// <returns></returns>
487
- public async Task < bool > FillBufferAsync ( CancellationToken cancellationToken = default ( CancellationToken ) )
487
+ public async Task < bool > FillBufferAsync ( CancellationToken cancellationToken = default )
488
488
{
489
489
if ( closed )
490
490
{
@@ -526,7 +526,7 @@ public bool FillBuffer()
526
526
/// Read a line from the byte stream
527
527
/// </summary>
528
528
/// <returns></returns>
529
- public Task < string > ReadLineAsync ( CancellationToken cancellationToken = default ( CancellationToken ) )
529
+ public Task < string > ReadLineAsync ( CancellationToken cancellationToken = default )
530
530
{
531
531
return ReadLineInternalAsync ( this , bufferPool , cancellationToken ) ;
532
532
}
@@ -535,9 +535,9 @@ public bool FillBuffer()
535
535
/// Read a line from the byte stream
536
536
/// </summary>
537
537
/// <returns></returns>
538
- internal static async Task < string > ReadLineInternalAsync ( ICustomStreamReader reader , IBufferPool bufferPool , CancellationToken cancellationToken = default ( CancellationToken ) )
538
+ internal static async Task < string > ReadLineInternalAsync ( ICustomStreamReader reader , IBufferPool bufferPool , CancellationToken cancellationToken = default )
539
539
{
540
- byte lastChar = default ( byte ) ;
540
+ byte lastChar = default ;
541
541
542
542
int bufferDataLength = 0 ;
543
543
@@ -591,7 +591,7 @@ public bool FillBuffer()
591
591
/// Read until the last new line, ignores the result
592
592
/// </summary>
593
593
/// <returns></returns>
594
- public async Task ReadAndIgnoreAllLinesAsync ( CancellationToken cancellationToken = default ( CancellationToken ) )
594
+ public async Task ReadAndIgnoreAllLinesAsync ( CancellationToken cancellationToken = default )
595
595
{
596
596
while ( ! string . IsNullOrEmpty ( await ReadLineAsync ( cancellationToken ) ) )
597
597
{
0 commit comments