Table of Contents

Class CsvWriter

Namespace
Bonsai.IO
Assembly
Bonsai.System.dll

Represents an operator that writes a delimited text representation of each element of the sequence to a text file.

[WorkflowElementCategory(ElementCategory.Sink)]
public class CsvWriter : CombinatorExpressionBuilder, IPropertyMappingBuilder, IExpressionBuilder
Inheritance
CsvWriter
Implements
Inherited Members
Extension Methods

Constructors

CsvWriter()

Initializes a new instance of the CsvWriter class.

public CsvWriter()

Properties

Append

Gets or sets a value indicating whether data should be appended to the output file if it already exists.

public bool Append { get; set; }

Property Value

bool

Delimiter

Gets or sets the optional delimiter used to separate columns in the output file.

public string Delimiter { get; set; }

Property Value

string

FileName

Gets or sets the name of the output CSV file.

[FileNameFilter("CSV (Comma delimited)|*.csv|All Files|*.*")]
public string FileName { get; set; }

Property Value

string

IncludeHeader

Gets or sets a value indicating whether to include a text header with column names for multi-attribute values.

public bool IncludeHeader { get; set; }

Property Value

bool

ListSeparator

Gets or sets the separator used to delimit elements in variable length rows. This argument is optional.

public string ListSeparator { get; set; }

Property Value

string

Overwrite

Gets or sets a value indicating whether the output file should be overwritten if it already exists.

public bool Overwrite { get; set; }

Property Value

bool

Selector

Gets or sets the inner properties that will be selected when writing each element of the sequence.

public string Selector { get; set; }

Property Value

string

Suffix

Gets or sets the suffix used to generate file names.

public PathSuffix Suffix { get; set; }

Property Value

PathSuffix

Methods

BuildCombinator(IEnumerable<Expression>)

When overridden in a derived class, generates an Expression node that will be combined with any existing property mappings to produce the final output of the expression builder.

protected override Expression BuildCombinator(IEnumerable<Expression> arguments)

Parameters

arguments IEnumerable<Expression>

A collection of Expression nodes that represents the input arguments.

Returns

Expression

An Expression tree node that represents the combinator output.