Table of Contents

Class TabularDialect

Namespace
Addax.Formats.Tabular
Assembly
Addax.Formats.Tabular.dll

Specifies how to read and write tabular data. This class cannot be inherited.

public sealed class TabularDialect
Inheritance
TabularDialect

Constructors

TabularDialect(string, char, char)

Initializes a new instance of the TabularDialect class with the specified tokens.

public TabularDialect(string lineTerminator, char delimiter, char quoteSymbol)

Parameters

lineTerminator string

The character sequence that is used to separate records. Must have one or two distinct characters.

delimiter char

The character that is used to separate fields. Must differ from line terminator characters.

quoteSymbol char

The character that is used to surround an escaped field and escape itself within an escaped field. Must differ from line terminator and delimiter characters.

Exceptions

ArgumentException

A token value is not valid for this dialect.

ArgumentNullException

lineTerminator is null.

TabularDialect(string, char, char, char)

Initializes a new instance of the TabularDialect class with the specified tokens.

public TabularDialect(string lineTerminator, char delimiter, char quoteSymbol, char escapeSymbol)

Parameters

lineTerminator string

The character sequence that is used to separate records. Must have one or two distinct characters.

delimiter char

The character that is used to separate fields. Must differ from line terminator characters.

quoteSymbol char

The character that is used to surround an escaped field. Must differ from line terminator and delimiter characters.

escapeSymbol char

The character that is used to escape the quote symbol and itself within an escaped field. Must differ from line terminator and delimiter characters.

Exceptions

ArgumentException

A token value is not valid for this dialect.

ArgumentNullException

lineTerminator is null.

TabularDialect(string, char, char, char, char)

Initializes a new instance of the TabularDialect class with the specified tokens.

public TabularDialect(string lineTerminator, char delimiter, char quoteSymbol, char escapeSymbol, char annotationPrefix)

Parameters

lineTerminator string

The character sequence that is used to separate records. Must have one or two distinct characters.

delimiter char

The character that is used to separate fields. Must differ from line terminator characters.

quoteSymbol char

The character that is used to surround an escaped field. Must differ from line terminator and delimiter characters.

escapeSymbol char

The character that is used to escape the quote symbol and itself within an escaped field. Must differ from line terminator and delimiter characters.

annotationPrefix char

The character that is used at the beginning of a record to indicate that the record is an annotation. Must differ from line terminator, delimiter, quote, and escape characters.

Exceptions

ArgumentException

A token value is not valid for this dialect.

ArgumentNullException

lineTerminator is null.

Properties

AnnotationPrefix

Gets the character that is used at the beginning of a record to indicate that the record is an annotation.

public char? AnnotationPrefix { get; }

Property Value

char?

A UTF-16 code unit or null, if not set.

Delimiter

Gets the character that is used to separate fields.

public char Delimiter { get; }

Property Value

char

A UTF-16 code unit.

EscapeSymbol

Gets the character that is used to escape the quote symbol and itself within an escaped field.

public char EscapeSymbol { get; }

Property Value

char

A UTF-16 code unit. Equals to QuoteSymbol, if not set.

LineTerminator

Gets the character sequence that is used to separate records.

public string LineTerminator { get; }

Property Value

string

A strings that has one or two UTF-16 code units.

QuoteSymbol

Gets the character that is used to surround an escaped field.

public char QuoteSymbol { get; }

Property Value

char

A UTF-16 code unit.