File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
tests/Smdn.Net.MuninNode/Smdn.Net.MuninNode Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Smdn . Net . MuninNode ;
13
13
14
- internal static class StreamReaderWriterExtensions {
14
+ internal static class TextReaderWriterExtensions {
15
15
#if ! SYSTEM_IO_TEXTREADER_READLINEASYNC_CANCELLATIONTOKEN
16
- public static async Task < string ? > ReadLineAsync ( this StreamReader reader , CancellationToken cancellationToken )
16
+ public static async Task < string ? > ReadLineAsync ( this TextReader reader , CancellationToken cancellationToken )
17
17
=> await reader . ReadLineAsync ( ) . WaitAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
18
18
#endif
19
19
20
- public static async Task WriteLineAsync ( this StreamWriter writer , string value , CancellationToken cancellationToken )
20
+ public static async Task WriteLineAsync ( this TextWriter writer , string value , CancellationToken cancellationToken )
21
21
#if SYSTEM_IO_TEXTWRITER_WRITELINEASYNC_CANCELLATIONTOKEN
22
22
=> await writer . WriteLineAsync ( value . AsMemory( ) , cancellationToken ) . ConfigureAwait( false ) ;
23
23
#else
24
24
=> await writer . WriteLineAsync ( value . AsMemory( ) ) . WaitAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
25
25
#endif
26
26
27
27
#if ! SYSTEM_IO_TEXTWRITER_FLUSHASYNC_CANCELLATIONTOKEN
28
- public static async Task FlushAsync ( this StreamWriter writer , CancellationToken cancellationToken )
28
+ public static async Task FlushAsync ( this TextWriter writer , CancellationToken cancellationToken )
29
29
=> await writer . FlushAsync ( ) . WaitAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
30
30
#endif
31
31
}
You can’t perform that action at this time.
0 commit comments