Table of Contents

Class CsvPoolingStringTextConverter

Namespace
FlameCsv.Converters
Assembly
FlameCsv.Core.dll

Pooling string converter for UTF-16. 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 CsvPoolingStringTextConverter : CsvConverter<char, string>
Inheritance
object
CsvPoolingStringTextConverter
Inherited Members

Constructors

CsvPoolingStringTextConverter()

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

public CsvPoolingStringTextConverter()

CsvPoolingStringTextConverter(StringPool?)

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

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

Parameters

pool StringPool

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

Properties

Instance

Singleton instance of the CsvPoolingStringTextConverter using the shared string pool.

public static CsvPoolingStringTextConverter Instance { get; }

Property Value

CsvPoolingStringTextConverter

Pool

Returns the string pool used by this converter.

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

Property Value

StringPool

Methods

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

Attempts to format value into the field.

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

Parameters

destination Span<char>

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<char>, out string)

Attempts to parse value from the field.

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

Parameters

source ReadOnlySpan<char>

CSV field

value string

Parsed value

Returns

bool

true if the value was successfully parsed.