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").

Inheritance
System.Object
TextSource<TOutput>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.DataFlow.Connectors
Assembly: ETLBox.dll
Syntax
    public class TextSource<TOutput> : DataFlowStreamSource<TOutput>, IDataFlowLogging, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowExecutableSource, IDataFlowStreamSource, ILoggableTask, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowComponent
Type Parameters
NameDescription
TOutput

Type of outgoing data.

Constructors

TextSource()

Declaration
    public TextSource()

TextSource(String)

Declaration
    public TextSource(string uri)
Parameters
TypeNameDescription
System.Stringuri

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

TextSource(String, Func<String, Int32, TOutput>)

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

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

System.Func<System.String, System.Int32, 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
System.Func<System.String, System.Int32, 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
System.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