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 1111
1212namespace Smdn . Net . MuninNode ;
1313
14- internal static class StreamReaderWriterExtensions {
14+ internal static class TextReaderWriterExtensions {
1515#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 )
1717 => await reader . ReadLineAsync ( ) . WaitAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
1818#endif
1919
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 )
2121#if SYSTEM_IO_TEXTWRITER_WRITELINEASYNC_CANCELLATIONTOKEN
2222 => await writer . WriteLineAsync ( value . AsMemory( ) , cancellationToken ) . ConfigureAwait( false ) ;
2323#else
2424 => await writer . WriteLineAsync ( value . AsMemory( ) ) . WaitAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
2525#endif
2626
2727#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 )
2929 => await writer . FlushAsync ( ) . WaitAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
3030#endif
3131}
You can’t perform that action at this time.
0 commit comments