Class TextSource<TOutput>

Reads data from a text file. Each line is read as a string and converted into an object by the ParseLineFunc. A line is defined as a sequence of characters followed by a line feed("\n"), a carriage return ("\r"), or a carriage return immediately followed by a line feed("\r\n").

Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public class TextSource<TOutput> : DataFlowStreamSource<TOutput>, IDataFlowLogging, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowStreamSource, IDataFlowExecutableSource, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowComponent, ILoggableTask
Type Parameters
NameDescription
TOutput

Type of outgoing data.

Constructors

TextSource()

Declaration
    public TextSource()

TextSource(string)

Declaration
    public TextSource(string uri)
Parameters
TypeNameDescription
stringuri

The source of the file. This can be a filename or a web url.Uri

TextSource(string, Func<string, int, TOutput>)

Declaration
    public TextSource(string uri, Func<string, int, TOutput> parseLineFunc)
Parameters
TypeNameDescription
stringuri

The source of the file. This can be a filename or a web url.Uri

Func<string, int, TOutput>parseLineFunc

ParseLineFunc

Properties

ParseLineFunc

This Function is called for every line in the source document. The input is the current read line as as string and the current progress count. The return value is the new row that is send into the connected components.

Declaration
    public Func<string, int, TOutput> ParseLineFunc { get; set; }
Property Value
TypeDescription
Func<string, int, TOutput>

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CloseReader()

Declaration
    protected override void CloseReader()
Overrides

InitReader()

Declaration
    protected override void InitReader()
Overrides

ReadAllRecords()

Declaration
    protected override void ReadAllRecords()
Overrides

Implements