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
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public class TextSource<TOutput> : DataFlowStreamSource<TOutput>, IDataFlowLogging, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowStreamSource, IDataFlowExecutableSource, ILoggableTask, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowComponent
Type Parameters
NameDescription
TOutput

Type of outgoing data.

Constructors

TextSource()

Declaration
    public TextSource()

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.System.Uri

System.Func<T1, T2, TResult><string, int, TOutput>parseLineFunc

ParseLineFunc

TextSource(string)

Declaration
    public TextSource(string uri)
Parameters
TypeNameDescription
stringuri

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

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
System.Func<T1, T2, TResult><string, int, TOutput>

TaskName

A name to identify the task or component. Every component or task comes with a default name that can be overwritten.

Declaration
    public override string TaskName { get; set; }
Property Value
TypeDescription
string
Overrides

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.CheckParameter()

CloseReader()

Declaration
    protected override void CloseReader()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.CloseReader()

InitReader()

Declaration
    protected override void InitReader()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.InitReader()

ReadAllRecords()

Declaration
    protected override void ReadAllRecords()
Overrides
ETLBox.DataFlow.DataFlowStreamSource<TOutput>.ReadAllRecords()

Implements