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
-
objectCsvPoolingStringUtf8Converter
- 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
StringPoolPool 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
Pool
Returns the string pool used by this converter.
[CLSCompliant(false)]
public StringPool Pool { get; }
Property Value
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
stringValue to format
charsWritten
intIf 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
stringParsed value
Returns
- bool
true
if the value was successfully parsed.