Share via


FileBufferingWriteStream Constructor

Definition

Initializes a new instance of FileBufferingWriteStream.

public FileBufferingWriteStream (int memoryThreshold = 32768, long? bufferLimit = default, Func<string> tempFileDirectoryAccessor = default);
public FileBufferingWriteStream (int memoryThreshold = 32768, long? bufferLimit = default, Func<string>? tempFileDirectoryAccessor = default);
new Microsoft.AspNetCore.WebUtilities.FileBufferingWriteStream : int * Nullable<int64> * Func<string> -> Microsoft.AspNetCore.WebUtilities.FileBufferingWriteStream
Public Sub New (Optional memoryThreshold As Integer = 32768, Optional bufferLimit As Nullable(Of Long) = Nothing, Optional tempFileDirectoryAccessor As Func(Of String) = Nothing)

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