C# Class Tp.Utils.Csv.CsvRenderer

Afficher le fichier Open project: TargetProcess/Target-Process-Plugins Class Usage Examples

Méthodes publiques

Méthode Description
CsvRenderer ( char delimiter, TextWriter textWriter ) : System

Creates new instance of this class.

Render ( IEnumerable columnNames ) : void
StartNewLine ( ) : void

Wraps value writing cursor to new line.

WriteBlock ( StringBuilder stream ) : void
WriteLine ( ) : void

Writes array of values as a row in CSV file.

WriteValue ( string value ) : void

Write single value in the current row at the current cursor position.

Private Methods

Méthode Description
NeedEscape ( string value ) : bool
WriteEscapedValue ( string value, TextWriter textWriter ) : void

Method Details

CsvRenderer() public méthode

Creates new instance of this class.
If is null.
public CsvRenderer ( char delimiter, TextWriter textWriter ) : System
delimiter char Delimiter to separate columns.
textWriter System.IO.TextWriter Where to write CSV text.
Résultat System

Render() public méthode

public Render ( IEnumerable columnNames ) : void
columnNames IEnumerable
Résultat void

StartNewLine() public méthode

Wraps value writing cursor to new line.
If new line has laready been started.
public StartNewLine ( ) : void
Résultat void

WriteBlock() public méthode

public WriteBlock ( StringBuilder stream ) : void
stream StringBuilder
Résultat void

WriteLine() public méthode

Writes array of values as a row in CSV file.
If is empty array. If contains nulls.
public WriteLine ( ) : void
Résultat void

WriteValue() public méthode

Write single value in the current row at the current cursor position.
public WriteValue ( string value ) : void
value string Single value to write at the current cursor position.
Résultat void