ParameterMap Class
Mapping for a constructor parameter. This may contain value type data, a constructor type map, or a reference map, depending on the type of the parameter.
Namespace
CsvHelper.Configuration
Base Types
  • object
graph BT Type-->Base0["object"] Type["ParameterMap"] class Type type-node

Syntax

[DebuggerDisplay("Data = {Data}")]
public class ParameterMap

Attributes

Type Description
DebuggerDisplayAttribute

Constructors

Name Summary
ParameterMap(ParameterInfo) Creates an instance of ParameterMap using the given information.

Properties

Name Property Type Summary
ConstructorTypeMap ClassMap
Gets or sets the map for a constructor type.
Data ParameterMapData
Gets the parameter map data.
ReferenceMap ParameterReferenceMap
Gets or sets the map for a reference type.
TypeConverterOption ParameterMapTypeConverterOption
Type converter options.

Methods

Name Return Value Summary
Constant(object) ParameterMap
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.
Default(object) ParameterMap
The default value that will be used when reading when the CSV field is empty.
Ignore() ParameterMap
Ignore the parameter when reading and writing.
Ignore(bool) ParameterMap
Ignore the parameter when reading and writing.
Index(int) ParameterMap
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(string[]) ParameterMap
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(int) ParameterMap
When reading, is used to get the index of the name used when there are multiple names that are the same.
Optional() ParameterMap
The field is optional.
TypeConverter(ITypeConverter) ParameterMap
Specifies the TypeConverter(ITypeConverter) to use when converting the parameter to and from a CSV field.
TypeConverter<TConverter>() ParameterMap
Specifies the TypeConverter(ITypeConverter) to use when converting the parameter to and from a CSV field.