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

IgnoreSetId(int[], int)

Resets an existing ID to ignore it.

[EditorBrowsable(EditorBrowsableState.Never)]
protected static void IgnoreSetId(int[] targets, int id)

Parameters

targets int[]
id int

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>

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>

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>

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>

Exceptions

CsvBindingException