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
poolStringPoolPool to use, or
nullto 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
destinationSpan<byte>Buffer to format the value to
valuestringValue to format
charsWrittenintIf successful, how many characters were written to
destination
Returns
- bool
trueif 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
sourceReadOnlySpan<byte>CSV field
valuestringParsed value
Returns
- bool
trueif the value was successfully parsed.