TextDestination<TInput>

Class TextDestination<TInput>

Writes data into a text file. Each line in the output is created by calling the WriteLineFunc or by invoking ToString() on the object.

Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public class TextDestination<TInput> : DataFlowStreamDestination<TInput>, IDataFlowStreamDestination<TInput>, IDataFlowStreamDestination, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, ILoggableTask
Type Parameters
NameDescription
TInput

Type of ingoing data.

Constructors

TextDestination()

The default ResourceType for a TextDestination is a file.

Declaration
    public TextDestination()

TextDestination(string)

Declaration
    public TextDestination(string filename)
Parameters
TypeNameDescription
stringfilename

Will set the Uri to the given file name.

TextDestination(string, Func<TInput, string>)

Declaration
    public TextDestination(string filename, Func<TInput, string> writeLineFunc)
Parameters
TypeNameDescription
stringfilename

Will set the Uri to the given file name.

Func<TInput, string>writeLineFunc

Sets the WriteLineFunc

Properties

WriteHeaderFunc

Before any rows are processed, the output of this function is written at the beginning of the output file.

Declaration
    public Func<string> WriteHeaderFunc { get; set; }
Property Value
TypeDescription
Func<string>

WriteLineFunc

Defines how each row from the input is written into the file. The input for the Func is an object of the ingoing data type and return a string that is written into the target.

Declaration
    public Func<TInput, string> WriteLineFunc { get; set; }
Property Value
TypeDescription
Func<TInput, string>

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CloseStream()

Declaration
    protected override void CloseStream()
Overrides

InitStream()

Declaration
    protected override void InitStream()
Overrides

WriteIntoStream(TInput)

Declaration
    protected override void WriteIntoStream(TInput data)
Parameters
TypeNameDescription
TInputdata
Overrides

Implements