Configuration used for the
IWriter
.
- Namespace
- CsvHelper
.Configuration - Implementing Types
graph BT
Type["IWriterConfiguration"]
class Type type-node
Implementing0["CsvConfiguration"]-.->Type
click Implementing0 "/CsvHelper/api/CsvHelper.Configuration/CsvConfiguration"
Syntax
public interface IWriterConfiguration
Properties
Name | Property Type | Summary |
---|---|---|
AllowComments | bool |
Gets a value indicating if comments are allowed.
True to allow commented out lines, otherwise false.
|
BufferSize | int |
Gets the size of the buffer
used for parsing and writing CSV files.
Default is 0x1000.
|
Comment | char |
Gets the character used to denote
a line that is commented out. Default is '#'.
|
CultureInfo | CultureInfo |
Gets the culture info used to read and write CSV files.
|
Delimiter | string |
Gets the delimiter used to separate fields.
Default is ',';
|
DynamicPropertySort | IComparer |
Gets the comparer used to order the properties
of dynamic objects when writing. The default is null,
which will preserve the order the object properties
were created with.
|
Escape | char |
The character used to escape characters.
Default is '"'.
|
Exception |
bool |
A value indicating if exception messages contain raw CSV data.
true if exception contain raw CSV data, otherwise false .
Default is true .
|
HasHeaderRecord | bool |
Gets a value indicating if the
CSV file has a header record.
Default is true.
|
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.
|
InjectionCharacters | char[] |
Gets the characters that are used for injection attacks.
|
Injection |
char |
Gets the character used to escape a detected injection.
|
InjectionOptions | InjectionOptions |
Gets the injection options.
|
IsNewLineSet | bool |
A value indicating if
NewLine was set.
|
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.
|
Mode | CsvMode |
The mode.
See
CsvMode for more details.
|
NewLine | string |
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.
|
Quote | char |
Gets the character used to quote fields.
Default is '"'.
|
Reference |
Reference |
Gets a callback that will return the prefix for a reference header.
|
ShouldQuote | ShouldQuote |
Gets a function that is used to determine if a field should get quoted
when writing.
|
TrimOptions | TrimOptions |
Gets the field trimming options.
|
Use |
bool |
Gets a value indicating that during writing if a new
object should be created when a reference member is null.
True to create a new object and use it's defaults for the
fields, or false to leave the fields empty for all the
reference member's member.
|
Methods
Name | Return Value | Summary |
---|---|---|
Validate |
void |
Validates the configuration.
|