Configuration used for the
IReader
.
- Namespace
- CsvHelper
.Configuration - Interfaces
- Implementing Types
graph BT
Type-.->Interface0["IParserConfiguration"]
click Interface0 "/CsvHelper/api/CsvHelper.Configuration/IParserConfiguration"
Type["IReaderConfiguration"]
class Type type-node
Implementing0["CsvConfiguration"]-.->Type
click Implementing0 "/CsvHelper/api/CsvHelper.Configuration/CsvConfiguration"
Syntax
public interface IReaderConfiguration : IParserConfiguration
Properties
Name | Property Type | Summary |
---|---|---|
Detect |
bool |
Gets a value indicating whether changes in the column
count should be detected. If true, a
BadDataException
will be thrown if a different column count is detected.
|
GetConstructor | GetConstructor |
Chooses the constructor to use for constructor mapping.
|
Get |
Get |
Gets the name to use for the property of the dynamic object.
|
HasHeaderRecord | bool |
Gets a value indicating if the
CSV file has a header record.
Default is true.
|
HeaderValidated | HeaderValidated |
Gets the function that is called when a header validation check is ran. The default function
will throw a
ValidationException if there is no header for a given member mapping.
You can supply your own function to do other things like logging the issue instead of throwing an exception.
|
IgnoreReferences | bool |
Gets a value indicating whether references
should be ignored when auto mapping.
true to ignore
references, otherwise false . Default is false.
|
Include |
bool |
Gets a value indicating if private
member should be read from and written to.
true to include private member, otherwise false . Default is false.
|
MemberTypes | MemberTypes |
Gets the member types that are used when auto mapping.
MemberTypes are flags, so you can choose more than one.
Default is Properties.
|
MissingFieldFound | MissingFieldFound |
Gets the function that is called when a missing field is found. The default function will
throw a
MissingFieldException . You can supply your own function to do other things
like logging the issue instead of throwing an exception.
|
Prepare |
Prepare |
Prepares the header field for matching against a member name.
The header field and the member name are both ran through this function.
You should do things like trimming, removing whitespace, removing underscores,
and making casing changes to ignore case.
|
Reading |
Reading |
Gets the function that is called when a reading exception occurs.
The default function will re-throw the given exception. If you want to ignore
reading exceptions, you can supply your own function to do other things like
logging the issue.
|
Reference |
Reference |
Gets a callback that will return the prefix for a reference header.
|
ShouldSkipRecord | ShouldSkipRecord |
Gets the callback that will be called to
determine whether to skip the given record or not.
|
Should |
Should |
Determines if constructor parameters should be used to create
the class instead of the default constructor and members.
|