Table of Contents

Class CsvPoolingStringUtf8Converter

Namespace
FlameCsv.Converters
Assembly
FlameCsv.Core.dll

Pooling string converter for UTF-8. This converter uses a StringPool to manage string instances, which will lower raw parsing throughput but reduce memory usage when parsing many strings with the same values.

[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class CsvPoolingStringUtf8Converter : CsvConverter<byte, string>
Inheritance
object
CsvPoolingStringUtf8Converter
Inherited Members

Constructors

CsvPoolingStringUtf8Converter()

Initializes a new instance of the CsvPoolingStringUtf8Converter class with the shared string pool.

public CsvPoolingStringUtf8Converter()

CsvPoolingStringUtf8Converter(StringPool?)

Initializes a new instance of the CsvPoolingStringUtf8Converter class with the specified string pool.

[CLSCompliant(false)]
public CsvPoolingStringUtf8Converter(StringPool? pool)

Parameters

pool StringPool

Pool to use, or null to use the shared pool.

Properties

Instance

Singleton instance of the CsvPoolingStringUtf8Converter using the shared string pool.

public static CsvPoolingStringUtf8Converter Instance { get; }

Property Value

CsvPoolingStringUtf8Converter

Pool

Returns the string pool used by this converter.

[CLSCompliant(false)]
public StringPool Pool { get; }

Property Value

StringPool

Methods

TryFormat(Span<byte>, string, out int)

Attempts to format value into the field.

public override bool TryFormat(Span<byte> destination, string value, out int charsWritten)

Parameters

destination Span<byte>

Buffer to format the value to

value string

Value to format

charsWritten int

If successful, how many characters were written to destination

Returns

bool

true if the value was successfully formatted.

TryParse(ReadOnlySpan<byte>, out string)

Attempts to parse value from the field.

public override bool TryParse(ReadOnlySpan<byte> source, out string value)

Parameters

source ReadOnlySpan<byte>

CSV field

value string

Parsed value

Returns

bool

true if the value was successfully parsed.