FileBufferingWriteStream Constructor

Definition

Initializes a new instance of FileBufferingWriteStream.

C#
public FileBufferingWriteStream (int memoryThreshold = 32768, long? bufferLimit = default, Func<string> tempFileDirectoryAccessor = default);
C#
public FileBufferingWriteStream (int memoryThreshold = 32768, long? bufferLimit = default, Func<string>? tempFileDirectoryAccessor = default);

Parameters

memoryThreshold
Int32

The maximum amount of memory in bytes to allocate before switching to a file on disk. Defaults to 32kb.

bufferLimit
Nullable<Int64>

The maximum amount of bytes that the FileBufferingWriteStream is allowed to buffer.

tempFileDirectoryAccessor
Func<String>

Provides the location of the directory to write buffered contents to. When unspecified, uses the value specified by the environment variable ASPNETCORE_TEMP if available, otherwise uses the value returned by GetTempPath().

Applies to

Product Versions
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0