DotNext by .NET Foundation and Contributors

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

 IFlushable

public interface IFlushable
Represents a destination of data that can be flushed.
void DiscoverFlushMethods<T>(T obj, ref Action flush, ref Func flushAsync)

Checks if the specified object implements IFlushable interface and modifies the callbacks.

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.