Title here
Summary here
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").
public class TextSource<TOutput> : DataFlowStreamSource<TOutput>, IDataFlowLogging, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowStreamSource, IDataFlowExecutableSource, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowComponent, ILoggableTask
Name | Description |
---|---|
TOutput | Type of outgoing data. |
public TextSource()
public TextSource(string uri)
Type | Name | Description |
---|---|---|
string | uri | The source of the file. This can be a filename or a web url.Uri |
public TextSource(string uri, Func<string, int, TOutput> parseLineFunc)
Type | Name | Description |
---|---|---|
string | uri | The source of the file. This can be a filename or a web url.Uri |
Func<string, int, TOutput> | 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.
public Func<string, int, TOutput> ParseLineFunc { get; set; }
Type | Description |
---|---|
Func<string, int, TOutput> |
protected override void CheckParameter()
protected override void CloseReader()
protected override void InitReader()
protected override void ReadAllRecords()