Table of Contents

Class CsvBinding<T>

Namespace
FlameCsv.Binding
Assembly
FlameCsv.Core.dll

A binding between a CSV field and a property, field, or parameter.

[EditorBrowsable(EditorBrowsableState.Advanced)]
public abstract class CsvBinding<T> : CsvBinding, IComparable<CsvBinding>, IEquatable<CsvBinding>, IEquatable<CsvBinding<T>>

Type Parameters

T

Token type

Inheritance
CsvBinding<T>
Implements
Inherited Members

Constructors

CsvBinding(int, string?)

Internal implementation detail.

protected CsvBinding(int index, string? header)

Parameters

index int
header string

Properties

Attributes

Returns the custom attributes on the binding, or empty if not applicable (e.g., ignored field).

protected abstract ReadOnlySpan<object> Attributes { get; }

Property Value

ReadOnlySpan<object>

DisplayName

Display name for debugging.

protected abstract string DisplayName { get; }

Property Value

string

TargetComparer

Comparer that compares bindings by their target property, field, or parameter.

public static IEqualityComparer<CsvBinding<T>> TargetComparer { get; }

Property Value

IEqualityComparer<CsvBinding<T>>

Type

Returns the type of the binding's target (property/field/parameter type). For ignored fields, returns typeof(object).

public override Type Type { get; }

Property Value

Type

Exceptions

InvalidOperationException

Methods

Equals(CsvBinding?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CsvBinding? other)

Parameters

other CsvBinding

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(CsvBinding<T>?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CsvBinding<T>? other)

Parameters

other CsvBinding<T>

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

PrintDetails(StringBuilder)

Prints details for debugging to the builder.

protected abstract void PrintDetails(StringBuilder sb)

Parameters

sb StringBuilder

ToString()

Returns the field index and member name.

public override string ToString()

Returns

string