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
-
objectCsvPoolingStringTextConverter
- 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
poolStringPoolPool to use, or
nullto use the shared pool.
Properties
Instance
Singleton instance of the CsvPoolingStringTextConverter using the shared string pool.
public static CsvPoolingStringTextConverter Instance { get; }
Property Value
Pool
Returns the string pool used by this converter.
[CLSCompliant(false)]
public StringPool Pool { get; }
Property Value
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
destinationSpan<char>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<char>, out string)
Attempts to parse value from the field.
public override bool TryParse(ReadOnlySpan<char> source, out string value)
Parameters
sourceReadOnlySpan<char>CSV field
valuestringParsed value
Returns
- bool
trueif the value was successfully parsed.