Class RowTransformation<TInput, TOutput>
The RowTransformation will apply the transformation function to each row of data.
Inheritance
object
DataFlowSource<TOutput>
DataFlowTransformation<TInput, TOutput>
RowTransformation<TInput, TOutput>
Implements
IDataFlowTransformation<TInput, TOutput>
IDataFlowSource<TOutput>
IDataFlowDestination<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.Transformations
Assembly: ETLBox.dll
Syntax
public class RowTransformation<TInput, TOutput> : DataFlowTransformation<TInput, TOutput>, ILoggableTask, IDataFlowLogging, IDataFlowTransformation<TInput, TOutput>, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent
Type Parameters
Name | Description |
---|---|
TInput | The type of ingoing data. |
TOutput | The type of outgoing data. |
Examples
RowTransformation<InputType, OutputType> trans = new RowTransformation<InputType, OutputType>(
row => {
return new OutputType() { Value = row.Value + 1 };
});
Constructors
RowTransformation()
Declaration
public RowTransformation()
Examples
RowTransformation<InputType, OutputType> trans = new RowTransformation<InputType, OutputType>(
row => {
return new OutputType() { Value = row.Value + 1 };
});
RowTransformation(Func<TInput, TOutput>, Action)
Declaration
public RowTransformation(Func<TInput, TOutput> transformationFunc, Action initAction)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T, TResult><TInput, TOutput> | transformationFunc | Will set the TransformationFunc |
System.Action | initAction | Will set the InitAction |
RowTransformation(Func<TInput, TOutput>)
Declaration
public RowTransformation(Func<TInput, TOutput> transformationFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T, TResult><TInput, TOutput> | transformationFunc | Will set the TransformationFunc |
Fields
WasInitActionInvoked
Declaration
protected bool WasInitActionInvoked
Field Value
Type | Description |
---|---|
bool |
Examples
RowTransformation<InputType, OutputType> trans = new RowTransformation<InputType, OutputType>(
row => {
return new OutputType() { Value = row.Value + 1 };
});
Properties
InitAction
The init action is executed shortly before the first data row is processed.
Declaration
public Action InitAction { get; set; }
Property Value
Type | Description |
---|---|
System.Action |
SourceBlock
SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.
Declaration
public override ISourceBlock<TOutput> SourceBlock { get; }
Property Value
Type | Description |
---|---|
System.Threading.Tasks.Dataflow.ISourceBlock<TOutput><TOutput> |
Overrides
ETLBox.DataFlow.DataFlowSource<TOutput>.SourceBlock
TargetBlock
TargetBlock from the underlying TPL.Dataflow which is used as input buffer for the component.
Declaration
public override ITargetBlock<TInput> TargetBlock { get; }
Property Value
Type | Description |
---|---|
System.Threading.Tasks.Dataflow.ITargetBlock<TInput><TInput> |
Overrides
ETLBox.DataFlow.DataFlowTransformation<TInput, TOutput>.TargetBlock
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
TransformationFunc
Each ingoing row will be transformed using this function.
Declaration
public Func<TInput, TOutput> TransformationFunc { get; set; }
Property Value
Type | Description |
---|---|
System.Func<T, TResult><TInput, TOutput> |
Methods
CheckParameter()
Declaration
protected override void CheckParameter()
Overrides
Examples
RowTransformation<InputType, OutputType> trans = new RowTransformation<InputType, OutputType>(
row => {
return new OutputType() { Value = row.Value + 1 };
});
CleanUpOnFaulted(Exception)
Declaration
protected override void CleanUpOnFaulted(Exception e)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | e |
Overrides
Examples
RowTransformation<InputType, OutputType> trans = new RowTransformation<InputType, OutputType>(
row => {
return new OutputType() { Value = row.Value + 1 };
});
CleanUpOnSuccess()
Declaration
protected override void CleanUpOnSuccess()
Overrides
Examples
RowTransformation<InputType, OutputType> trans = new RowTransformation<InputType, OutputType>(
row => {
return new OutputType() { Value = row.Value + 1 };
});
InitComponent()
Declaration
protected override void InitComponent()
Overrides
Examples
RowTransformation<InputType, OutputType> trans = new RowTransformation<InputType, OutputType>(
row => {
return new OutputType() { Value = row.Value + 1 };
});
InvokeInitActionOnce()
Declaration
protected virtual void InvokeInitActionOnce()
Examples
RowTransformation<InputType, OutputType> trans = new RowTransformation<InputType, OutputType>(
row => {
return new OutputType() { Value = row.Value + 1 };
});
InvokeTransformationFunc(TInput)
Declaration
protected virtual TOutput InvokeTransformationFunc(TInput row)
Parameters
Type | Name | Description |
---|---|---|
TInput | row |
Returns
Type | Description |
---|---|
TOutput |
Examples
RowTransformation<InputType, OutputType> trans = new RowTransformation<InputType, OutputType>(
row => {
return new OutputType() { Value = row.Value + 1 };
});