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, ILoggableTaskType Parameters
| Name | Description |
|---|---|
| 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
| Type | Name | Description |
|---|---|---|
| string | filename | Will set the Uri to the given file name. |
TextDestination(string, Func<TInput, string>)
Declaration
public TextDestination(string filename, Func<TInput, string> writeLineFunc)Parameters
| Type | Name | Description |
|---|---|---|
| string | filename | 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
| Type | Description |
|---|---|
| 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
| Type | Description |
|---|---|
| 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
| Type | Name | Description |
|---|---|---|
| TInput | data |