Class CsvBinding<T>
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
-
IEquatable<CsvBinding<T>>
- Inherited Members
Constructors
CsvBinding(int, string?)
Internal implementation detail.
protected CsvBinding(int index, string? header)
Parameters
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
DisplayName
Display name for debugging.
protected abstract string DisplayName { get; }
Property Value
TargetComparer
Comparer that compares bindings by their target property, field, or parameter.
public static IEqualityComparer<CsvBinding<T>> TargetComparer { get; }
Property Value
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
Exceptions
Methods
Equals(CsvBinding?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(CsvBinding? other)
Parameters
other
CsvBindingAn object to compare with this object.
Returns
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
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
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
ToString()
Returns the field index and member name.
public override string ToString()