FileBufferingWriteStream 建構函式

定義

初始化 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)

參數

memoryThreshold
Int32

切換至磁片上的檔案之前,要配置的記憶體數量上限,以位元組為單位。 預設值為 32kb。

bufferLimit
Nullable<Int64>

允許緩衝的最大位元組 FileBufferingWriteStream 數量。

tempFileDirectoryAccessor
Func<String>

提供要寫入緩衝內容之目錄的位置。 若未指定,請使用環境變數 ASPNETCORE_TEMP 所指定的值,否則會使用 所 GetTempPath() 傳回的值。

適用於