Skip to content

Commit

Permalink
disable shim if available
Browse files Browse the repository at this point in the history
  • Loading branch information
smdn committed Oct 11, 2024
1 parent 63e3374 commit 1cf36fd
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public static async Task WriteLineAsync(this StreamWriter writer, string value,
=> await writer.WriteLineAsync(value.AsMemory()).WaitAsync(cancellationToken).ConfigureAwait(false);
#endif

#if !SYSTEM_IO_TEXTWRITER_FLUSHASYNC_CANCELLATIONTOKEN
public static async Task FlushAsync(this StreamWriter writer, CancellationToken cancellationToken)
=> await writer.FlushAsync(cancellationToken).WaitAsync(cancellationToken).ConfigureAwait(false);
#endif
}

0 comments on commit 1cf36fd

Please sign in to comment.