Table of Contents

Class MemberMapData

Namespace
CsvHelper.Configuration
Assembly
CsvHelper.dll

The configured data for the member map.

public class MemberMapData
Inheritance
MemberMapData
Inherited Members

Constructors

MemberMapData(MemberInfo?)

Initializes a new instance of the MemberMapData class.

public MemberMapData(MemberInfo? member)

Parameters

member MemberInfo

The member.

Properties

Constant

Gets or sets the constant value used for every record.

public virtual object? Constant { get; set; }

Property Value

object

Default

Gets or sets the default value used when a CSV field is empty.

public virtual object? Default { get; set; }

Property Value

object

Ignore

Gets or sets a value indicating whether the field should be ignored.

public virtual bool Ignore { get; set; }

Property Value

bool

Index

Gets or sets the column index.

public virtual int Index { get; set; }

Property Value

int

IndexEnd

Gets or sets the index end. The Index end is used to specify a range for use with a collection member. Index is used as the start of the range, and IndexEnd is the end of the range.

public virtual int IndexEnd { get; set; }

Property Value

int

IsConstantSet

Gets or sets a value indicating if a constant was explicitly set.

public virtual bool IsConstantSet { get; set; }

Property Value

bool

IsDefaultSet

Gets or sets a value indicating whether this instance is default value set. the default value was explicitly set. True if it was explicitly set, otherwise false.

public virtual bool IsDefaultSet { get; set; }

Property Value

bool

IsIndexSet

Gets or sets a value indicating if the index was explicitly set. True if it was explicitly set, otherwise false.

public virtual bool IsIndexSet { get; set; }

Property Value

bool

IsNameSet

Gets or sets a value indicating if the name was explicitly set. True if it was explicitly set, otherwise false.

public virtual bool IsNameSet { get; set; }

Property Value

bool

IsOptional

Gets or sets a value indicating if a field is optional.

public virtual bool IsOptional { get; set; }

Property Value

bool

Member

Gets the MemberInfo that the data is associated with.

public virtual MemberInfo? Member { get; }

Property Value

MemberInfo

NameIndex

Gets or sets the index of the name. This is used if there are multiple columns with the same names.

public virtual int NameIndex { get; set; }

Property Value

int

Names

Gets the list of column names.

public virtual MemberNameCollection Names { get; }

Property Value

MemberNameCollection

ReadingConvertExpression

Gets or sets the expression used to convert data in the row to the member.

public virtual Expression? ReadingConvertExpression { get; set; }

Property Value

Expression

Type

Gets the member type.

public virtual Type Type { get; }

Property Value

Type

TypeConverter

Gets or sets the type converter.

public virtual ITypeConverter? TypeConverter { get; set; }

Property Value

ITypeConverter

TypeConverterOptions

Gets or sets the type converter options.

public virtual TypeConverterOptions TypeConverterOptions { get; set; }

Property Value

TypeConverterOptions

UseDefaultOnConversionFailure

Gets or setse a value indicating if the default value should be used when a type conversion failure happens. true to use the default, otherwise false.

public virtual bool UseDefaultOnConversionFailure { get; set; }

Property Value

bool

ValidateExpression

Gets or sets the expression use to validate a field.

public virtual Expression? ValidateExpression { get; set; }

Property Value

Expression

ValidateMessageExpression

Gets or sets the expression used to get the validation message when validation fails.

public virtual Expression? ValidateMessageExpression { get; set; }

Property Value

Expression

WritingConvertExpression

Gets or sets the expression to be used to convert the object to a field.

public virtual Expression? WritingConvertExpression { get; set; }

Property Value

Expression