CsvHelper.Configuration.Attributes Namespace

Class Types

Class Summary
AllowCommentsAttribute A value indicating whether comments are allowed.
BooleanFalseValuesAttribute The string values used to represent a boolean false when converting.
BooleanTrueValuesAttribute The string values used to represent a boolean true when converting.
BufferSizeAttribute The size of the buffer used for parsing and writing CSV files. Default is 0x1000.
CacheFieldsAttribute Cache fields that are created when parsing.
CommentAttribute The character used to denote a line that is commented out. Default is #.
ConstantAttribute 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.
CountBytesAttribute A value indicating whether the number of bytes should be counted while parsing. This will slow down parsing because it needs to get the byte count of every char for the given encoding. The Encoding needs to be set correctly for this to be accurate.
CultureInfoAttribute When applied to a member, specifies the CultureInfo used when type converting the member. When applied to a type, the value of CultureInfo in the CsvConfiguration returned by FromAttributes<T>()
DateTimeStylesAttribute The DateTimeStyles to use when type converting. This is used when doing any DateTime conversions.
DefaultAttribute The default value that will be used when reading when the CSV field is empty.
DelimiterAttribute The delimiter used to separate fields.
DetectColumnCountChangesAttribute A value indicating whether changes in the column count should be detected. If , a BadDataException will be thrown if a different column count is detected.
DetectDelimiterAttribute Detect the delimiter instead of using the delimiter from configuration.
DetectDelimiterValuesAttribute The possible delimiter values used when detecting the delimiter. Default is [",", ";", "|", "\t"].
EncodingAttribute The encoding used when counting bytes.
EnumIgnoreCaseAttribute Ignore case when parsing enums.
EscapeAttribute The escape character used to escape a quote inside a field.
ExceptionMessagesContainRawDataAttribute A value indicating whether exception messages contain raw CSV data. if exceptions contain raw CSV data, otherwise .
FormatAttribute The string format to be used when type converting.
HasHeaderRecordAttribute A value indicating whether the CSV file has a header record.
HeaderPrefixAttribute Appends a prefix to the header of each field of the reference member.
IgnoreAttribute 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.
IgnoreBaseAttribute Ignores base classes when auto mapping.
IgnoreBlankLinesAttribute A value indicating whether blank lines should be ignored when reading.
IgnoreReferencesAttribute Gets a value indicating whether references should be ignored when auto mapping. to ignore references, otherwise .
IncludePrivateMembersAttribute A value indicating whether private members should be read from and written to.
IndexAttribute 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.
InjectionCharactersAttribute Gets the characters that are used for injection attacks.
InjectionEscapeCharacterAttribute The character used to escape a detected injection.
InjectionOptionsAttribute The injection options.
LineBreakInQuotedFieldIsBadDataAttribute A value indicating whether a line break found in a quote field should be considered bad data. to consider a line break bad data, otherwise .
MaxFieldSizeAttribute Gets or sets the maximum size of a field. Defaults to 0, indicating maximum field size is not checked.
MemberTypesAttribute The member types that are used when auto mapping. MemberTypes are flags, so you can choose more than one. Default is Properties.
ModeAttribute The mode. See CsvMode for more details.
NameAttribute 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.
NameIndexAttribute When reading, is used to get the index of the name used when there are multiple names that are the same.
NewLineAttribute The newline string to use. Default is \r\n (CRLF). When writing, this value is always used. When reading, this value is only used if explicitly set. If not set, the parser uses one of \r\n, \r, or \n.
NullValuesAttribute The string values used to represent null when converting.
NumberStylesAttribute The NumberStyles to use when type converting. This is used when doing any number conversions.
OptionalAttribute Ignore the member when reading if no matching field name can be found.
ProcessFieldBufferSizeAttribute The size of the buffer used when processing fields. Default is 1024.
QuoteAttribute The character used to quote fields.
TrimOptionsAttribute The fields trimming options.
TypeConverterAttribute Specifies the TypeConverter to use when converting the member to and from a CSV field.
UseNewObjectForNullReferenceMembersAttribute Gets a value indicating that during writing whether a new object should be created when a reference member is . to create a new object and use its defaults for the fields, or to leave the fields empty for all the reference member's members.
WhiteSpaceCharsAttribute Characters considered whitespace. Used when trimming fields. Default is [' '].

Interface Types

Interface Summary
IClassMapper Defines methods to enable pluggable configuration.
IMemberMapper Defines methods to enable pluggable configuration of member mapping.
IMemberReferenceMapper Defines methods to enable pluggable configuration of member reference mapping.
IParameterMapper Defines methods to enable pluggable configuration of parameter mapping.
IParameterReferenceMapper Defines methods to enable pluggable configuration of parameter reference mapping.