Table of Contents

Class CsvTypeMap

Namespace
FlameCsv.Binding
Assembly
FlameCsv.Core.dll

Base class providing throw helpers for CsvTypeMap<T, TValue>.

public abstract class CsvTypeMap
Inheritance
object
CsvTypeMap
Derived
CsvTypeMap<T, TValue>

Properties

TargetType

Returns the mapped type.

protected abstract Type TargetType { get; }

Property Value

Type

Methods

ThrowDuplicate(string, string, ImmutableArray<string>)

Throws an exception for header field being bound multiple times.

[DoesNotReturn]
[EditorBrowsable(EditorBrowsableState.Never)]
protected void ThrowDuplicate(string member, string field, ImmutableArray<string> headers)

Parameters

member string
field string
headers ImmutableArray<string>

Remarks

This API supports code produced by the FlameCsv source generator and is not intended to be used directly. Its compatibility is only guaranteed for the way generated code uses it; direct use from user code is not supported, and its behavior may change in a minor release.

Exceptions

CsvBindingException

ThrowNoFieldsBound(ImmutableArray<string>)

Throws an exception for header that couldn't be bound to any member of parameter.

[DoesNotReturn]
[EditorBrowsable(EditorBrowsableState.Never)]
protected void ThrowNoFieldsBound(ImmutableArray<string> headers)

Parameters

headers ImmutableArray<string>

Remarks

This API supports code produced by the FlameCsv source generator and is not intended to be used directly. Its compatibility is only guaranteed for the way generated code uses it; direct use from user code is not supported, and its behavior may change in a minor release.

Exceptions

CsvBindingException

ThrowRequiredNotRead(IEnumerable<string>, ImmutableArray<string>)

Throws an exception for a required member or parameter that wasn't bound to any of the headers.

[DoesNotReturn]
[EditorBrowsable(EditorBrowsableState.Never)]
protected void ThrowRequiredNotRead(IEnumerable<string> members, ImmutableArray<string> headers)

Parameters

members IEnumerable<string>
headers ImmutableArray<string>

Remarks

This API supports code produced by the FlameCsv source generator and is not intended to be used directly. Its compatibility is only guaranteed for the way generated code uses it; direct use from user code is not supported, and its behavior may change in a minor release.

Exceptions

CsvBindingException

ThrowUnmatched(string, int, ImmutableArray<string>)

Throws an exception for header field that wasn't matched to any member or parameter.

[DoesNotReturn]
[EditorBrowsable(EditorBrowsableState.Never)]
protected void ThrowUnmatched(string field, int index, ImmutableArray<string> headers)

Parameters

field string
index int
headers ImmutableArray<string>

Remarks

This API supports code produced by the FlameCsv source generator and is not intended to be used directly. Its compatibility is only guaranteed for the way generated code uses it; direct use from user code is not supported, and its behavior may change in a minor release.

Exceptions

CsvBindingException