RowTransformation<TInput, TOutput>

Class RowTransformation<TInput, TOutput>

The RowTransformation will apply the transformation function to each row of data.

Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public class RowTransformation<TInput, TOutput> : DataFlowTransformation<TInput, TOutput>, IDataFlowTransformation<TInput, TOutput>, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, ILoggableTask
Type Parameters
NameDescription
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()

RowTransformation(Func<TInput, TOutput>)

Declaration
    public RowTransformation(Func<TInput, TOutput> transformationFunc)
Parameters
TypeNameDescription
Func<TInput, TOutput>transformationFunc

Will set the TransformationFunc

RowTransformation(Func<TInput, TOutput>, Action)

Declaration
    public RowTransformation(Func<TInput, TOutput> transformationFunc, Action initAction)
Parameters
TypeNameDescription
Func<TInput, TOutput>transformationFunc

Will set the TransformationFunc

ActioninitAction

Will set the InitAction

Fields

WasInitActionInvoked

Declaration
    protected bool WasInitActionInvoked
Field Value
TypeDescription
bool

Properties

InitAction

The init action is executed shortly before the first data row is processed.

Declaration
    public Action InitAction { get; set; }
Property Value
TypeDescription
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
TypeDescription
ISourceBlock<TOutput>
Overrides

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
TypeDescription
ITargetBlock<TInput>
Overrides

TransformationFunc

Each ingoing row will be transformed using this function.

Declaration
    public Func<TInput, TOutput> TransformationFunc { get; set; }
Property Value
TypeDescription
Func<TInput, TOutput>

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CleanUpOnFaulted(Exception)

Declaration
    protected override void CleanUpOnFaulted(Exception e)
Parameters
TypeNameDescription
Exceptione
Overrides

CleanUpOnSuccess()

Declaration
    protected override void CleanUpOnSuccess()
Overrides

InitComponent()

Declaration
    protected override void InitComponent()
Overrides

InvokeInitActionOnce()

Declaration
    protected virtual void InvokeInitActionOnce()

InvokeTransformationFunc(TInput)

Declaration
    protected virtual TOutput InvokeTransformationFunc(TInput row)
Parameters
TypeNameDescription
TInputrow
Returns
TypeDescription
TOutput

Reset()

Declaration
    protected override void Reset()
Overrides

Implements