Mapping info for a member to a CSV field.
- Namespace
- CsvHelper
.Configuration - Base Types
-
- object
- Derived Types
graph BT
Type-->Base0["object"]
Type["MemberMap"]
class Type type-node
Derived0["MemberMap<TClass, TMember>"]-->Type
click Derived0 "/CsvHelper/api/CsvHelper.Configuration/MemberMap_2"
Syntax
[DebuggerDisplay("Member = {Data.Member}, Names = {string.Join(\",\", Data.Names)}, Index = {Data.Index}, Ignore = {Data.Ignore}, Member = {Data.Member}, TypeConverter = {Data.TypeConverter}")]
public abstract class MemberMap
Attributes
Type | Description |
---|---|
Debugger |
Properties
Name | Property Type | Summary |
---|---|---|
Data | MemberMapData |
Gets the member map data.
|
TypeConverterOption | Member |
Type converter options.
|
Methods
Name | Return Value | Summary |
---|---|---|
Constant |
MemberMap |
The constant value that will be used for every record when
reading and writing. This value will always be used no matter
what other mapping configurations are specified.
|
CreateGeneric |
MemberMap |
Creates an instance of
MemberMap using the given Type and MemberInfo .
static
|
Default |
MemberMap |
The default value that will be used when reading when
the CSV field is empty.
|
Ignore |
MemberMap |
Ignore the member when reading and writing.
If this member has already been mapped as a reference
member, either by a class map, or by automapping, calling
this method will not ignore all the child members down the
tree that have already been mapped.
|
Ignore |
MemberMap |
Ignore the member when reading and writing.
If this member has already been mapped as a reference
member, either by a class map, or by automapping, calling
this method will not ignore all the child members down the
tree that have already been mapped.
|
Index |
MemberMap |
When reading, is used to get the field at
the given index. When writing, the fields
will be written in the order of the field
indexes.
|
Name |
MemberMap |
When reading, is used to get the field
at the index of the name if there was a
header specified. It will look for the
first name match in the order listed.
When writing, sets the name of the
field in the header record.
The first name will be used.
|
NameIndex |
MemberMap |
When reading, is used to get the
index of the name used when there
are multiple names that are the same.
|
Optional |
MemberMap |
Ignore the member when reading if no matching field name can be found.
|
TypeConverter |
MemberMap |
Specifies the
TypeConverter(ITypeConverter) to use
when converting the member to and from a CSV field.
|
TypeConverter |
MemberMap |
Specifies the
TypeConverter(ITypeConverter) to use
when converting the member to and from a CSV field.
|
Validate |
MemberMap |
Specifies an expression to be used to validate a field when reading along with specified exception message.
|
Validate |
MemberMap |
Specifies an expression to be used to validate a field when reading.
|