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.
Inheritance
object
DataFlowDestination<TInput>
DataFlowStreamDestination<TInput>
TextDestination<TInput>
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 TextDestination<TInput> : DataFlowStreamDestination<TInput>, IDataFlowLogging, IDataFlowStreamDestination<TInput>, IDataFlowStreamDestination, ILoggableTask, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent
Type Parameters
Name | Description |
---|---|
TInput | Type of ingoing data. |
Constructors
TextDestination()
The default ResourceType for a TextDestination is a file.
Declaration
public TextDestination()
TextDestination(string, Func<TInput, string>)
Declaration
public TextDestination(string filename, Func<TInput, string> writeLineFunc)
Parameters
Type | Name | Description |
---|---|---|
string | filename | Will set the System.Uri to the given file name. |
System.Func<T, TResult><TInput, string> | writeLineFunc | Sets the WriteLineFunc |
TextDestination(string)
Declaration
public TextDestination(string filename)
Parameters
Type | Name | Description |
---|---|---|
string | filename | Will set the System.Uri to the given file name. |
Properties
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
Type | Description |
---|---|
string |
Overrides
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 |
---|---|
System.Func<TResult><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 |
---|---|
System.Func<T, TResult><TInput, string> |
Methods
CheckParameter()
Declaration
protected override void CheckParameter()
Overrides
ETLBox.DataFlow.DataFlowStreamDestination<TInput>.CheckParameter()
CloseStream()
Declaration
protected override void CloseStream()
Overrides
ETLBox.DataFlow.DataFlowStreamDestination<TInput>.CloseStream()
InitStream()
Declaration
protected override void InitStream()
Overrides
ETLBox.DataFlow.DataFlowStreamDestination<TInput>.InitStream()
WriteIntoStream(TInput)
Declaration
protected override void WriteIntoStream(TInput data)
Parameters
Type | Name | Description |
---|---|---|
TInput | data |
Overrides
ETLBox.DataFlow.DataFlowStreamDestination<TInput>.WriteIntoStream(TInput)