CsvHelperSettings Class

Summary

Contains settings used by CsvHelpers.
Assembly
Cake.CsvHelper.dll
Namespace
Cake.CsvHelper
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["CsvHelperSettings"] class Type type-node

Syntax

public class CsvHelperSettings

Constructors

Name Summary
CsvHelperSettings() Initializes the CsvHelperSettings class.

Properties

Name Value Summary
AllowComments bool
Gets or sets a value indicating if comments are allowed.
BufferSize int
Gets or sets the size of the buffer used for reading and writing CSV files.
Comment string
Gets or sets the character used to denote a line that is commented out.
CountBytes bool
Gets or sets a value indicating whether the number of bytes should be counted while parsing. Default is false. 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.
CultureInfo CultureInfo
Gets or sets the culture info used to read an write CSV files.
Delimiter string
Gets or sets the value used to separate the fields in a CSV row.
DetectColumnCountChanges bool
Gets or sets a value indicating whether changes in the column count should be detected. If true, a CsvHelper.BadDataException will be thrown if a different column count is detected.
Encoding Encoding
Gets or sets the encoding used when counting bytes.
HasHeaderRecord bool
Gets or sets a value indicating if the CSV file has a header record.
IgnoreHeaderWhiteSpace bool
Gets or sets a value indicating to ignore white space in the headers when matching the columns to the properties by name.
IgnorePrivateAccessor bool
Gets or sets a value indicating to ignore private accessors when reading and writing. By default you can't read from a private getter or write to a private setter. Turn this on will allow that. Properties that can't be read from or written to are silently ignored.
IgnoreQoutes bool
Gets or sets a value indicating if quotes should be ingored when parsing and treated like any other character.
IgnoreReadingExceptions bool
Gets or sets a value indicating whether exceptions that occur duruing reading should be ignored.
IsHeaderCaseSensitive bool
Gets or sets a value indicating whether matching CSV header names will be case sensitive.
PropertyBindingFlags BindingFlags
Gets or sets the property/field binding flags. This determines what properties/fields on the custom class are used. Default is Public | Instance.
Qoute string
Gets or sets a value used to escape fields that contain a delimiter, quote, or line ending.
QouteAllFields bool
Gets or sets a value indicating whether all fields are quoted when writing, or just ones that have to be. QouteAllFields and QouteNoFields cannot be true at the same time. Turning one on will turn the other off.
QouteNoFields bool
Gets or sets a value indicating whether no fields are quoted when writing. QouteAllFields and QouteNoFields cannot be true at the same time. Turning one on will turn the other off.
SkipEmptyRecords bool
Gets or sets a value indicating whether empty rows should be skipped when reading. A record is considered empty if all fields are empty.
TrimFields bool
Gets or sets a value indicating if the reader to trim whitespace from the beginning and ending of the field value when reading.
TrimHeaders bool
Gets or sets a value indicating ifthe reader to ignore white space from the beginning and ending of the headers when matching the columns to the properties by name.
WillThrowOnMissingField bool
Gets or sets a value indicating if an exception will be thrown if a field defined in a mapping is missing. True to throw an exception, otherwise false. Default is true.

Extension Methods

Name Value Summary
Dump<CsvHelperSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<CsvHelperSettings>(CsvHelperSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<CsvHelperSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<CsvHelperSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<CsvHelperSettings>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<CsvHelperSettings>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin