DotNext by Roman Sakno

<PackageReference Include="DotNext" Version="2.9.5" />

 IFlushable

public interface IFlushable
Represents a destination of data that can be flushed.

Creates open delegate for FlushAsync method if the specified object implements IFlushable interface.

Creates open delegate for Flush method if the specified object implements IFlushable interface.

void Flush()

Flushes this stream by writing any buffered output to the underlying stream.

Flushes this stream asynchronously by writing any buffered output to the underlying stream.