Struct FileBufferingWriter.Options
Represents construction options of the writer.
Inherited Members
Namespace: DotNext.IO
Assembly: DotNext.IO.dll
Syntax
public readonly struct FileBufferingWriter.Options
Properties
| Edit this page View SourceAsyncIO
To enable asynchronous I/O operations.
Declaration
public bool AsyncIO { get; init; }
Property Value
Type | Description |
---|---|
bool |
Remarks
In asynchronous mode you should use asynchronous methods for writing. Synchronous calls in this mode cause performance overhead. The default value is true.
FileBufferSize
Gets or sets memory buffer for file I/O operations.
Declaration
public int FileBufferSize { get; init; }
Property Value
Type | Description |
---|---|
int |
Remarks
This property has no effect if WriteThrough is true.
FileName
Defines the path to the file to be used as backing store for the written content when in-memory buffer overlfows.
Declaration
public string FileName { init; }
Property Value
Type | Description |
---|---|
string |
Remarks
If this property is defined then the file will not be deleted automatically on Dispose(bool) call.
InitialCapacity
Initial capacity of internal buffer. Should not be greater than MemoryThreshold.
Declaration
public int InitialCapacity { get; init; }
Property Value
Type | Description |
---|---|
int |
MeasurementTags
Sets a list of tags to be associated with each measurement.
Declaration
[CLSCompliant(false)]
public TagList MeasurementTags { get; init; }
Property Value
Type | Description |
---|---|
TagList |
MemoryAllocator
Gets or sets the allocator of internal buffer.
Declaration
public MemoryAllocator<byte>? MemoryAllocator { get; init; }
Property Value
Type | Description |
---|---|
MemoryAllocator<byte> |
MemoryThreshold
The maximum amount of memory in bytes to allocate before switching to a file on disk.
Declaration
public int MemoryThreshold { get; init; }
Property Value
Type | Description |
---|---|
int |
TempDir
Defines the path to the existing directory for placing temporary file to be used as backing store for the written content when in-memory buffer overflows.
Declaration
public string? TempDir { init; }
Property Value
Type | Description |
---|---|
string |
Remarks
If this property is defined then the file will be deleted automatically on Dispose(bool) call.
UseTemporaryFile
Gets a value indicating that the backing store for the writer should be represented by temporary file which will be deleted automatically.
Declaration
public bool UseTemporaryFile { get; }
Property Value
Type | Description |
---|---|
bool |
WriteThrough
Indicates that the system should write through any intermediate cache and go directly to disk.
Declaration
public bool WriteThrough { get; init; }
Property Value
Type | Description |
---|---|
bool |
Remarks
The default value is false.