Class RowDuplication<TInput>

Creates one or more duplicates of your incoming row. Use the CanDuplicate property if you want to duplicate only particular rows.

Inheritance
System.Object
DataFlowTransformation<TInput, TInput>
RowDuplication<TInput>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.DataFlow.Transformations
Assembly: ETLBox.dll
Syntax
    public class RowDuplication<TInput> : DataFlowTransformation<TInput, TInput>, IDataFlowLogging, ILoggableTask, IDataFlowTransformation<TInput, TInput>, IDataFlowSource<TInput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent
Type Parameters
NameDescription
TInput

Type of ingoing data.

Examples
var source = new DbSource<InputType>("SourceTable");
RowDuplication<InputType> duplication = new RowDuplication<InputType>(3);
var dest = new CsvDestination<InputType>("output.csv");
source.LinkTo(duplication).LinkTo(dest);

Constructors

RowDuplication()

Declaration
    public RowDuplication()

RowDuplication(Int32)

Declaration
    public RowDuplication(int numberOfDuplicates)
Parameters
TypeNameDescription
System.Int32numberOfDuplicates

Sets the NumberOfDuplicates

RowDuplication(Predicate<TInput>)

Declaration
    public RowDuplication(Predicate<TInput> canDuplicate)
Parameters
TypeNameDescription
System.Predicate<TInput>canDuplicate

Sets the CanDuplicate predicate

RowDuplication(Predicate<TInput>, Int32)

Declaration
    public RowDuplication(Predicate<TInput> canDuplicate, int numberOfDuplicates)
Parameters
TypeNameDescription
System.Predicate<TInput>canDuplicate

Sets the CanDuplicate predicate

System.Int32numberOfDuplicates

Sets the NumberOfDuplicates

Properties

CanDuplicate

A predicate that describe if a will be duplicated or not.

Declaration
    public Predicate<TInput> CanDuplicate { get; set; }
Property Value
TypeDescription
System.Predicate<TInput>

NumberOfDuplicates

Number of duplicates to be created for each ingoing row. Default is 1 (meaning the incoming row plus one copy).

Declaration
    public int NumberOfDuplicates { get; set; }
Property Value
TypeDescription
System.Int32

SourceBlock

SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.

Declaration
    public override ISourceBlock<TInput> SourceBlock { get; }
Property Value
TypeDescription
System.Threading.Tasks.Dataflow.ISourceBlock<TInput>
Overrides
ETLBox.DataFlow.DataFlowSource<TInput>.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
TypeDescription
System.Threading.Tasks.Dataflow.ITargetBlock<TInput>
Overrides
ETLBox.DataFlow.DataFlowTransformation<TInput, TInput>.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
TypeDescription
System.String
Overrides

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CleanUpOnFaulted(Exception)

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

CleanUpOnSuccess()

Declaration
    protected override void CleanUpOnSuccess()
Overrides

InitComponent()

Declaration
    protected override void InitComponent()
Overrides

Implements