Title here
Summary here
Creates one or more duplicates of your incoming row. Use the CanDuplicate property if you want to duplicate only particular rows.
public class RowDuplication<TInput> : DataFlowTransformation<TInput, TInput>, IDataFlowTransformation<TInput, TInput>, IDataFlowSource<TInput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, ILoggableTask
Name | Description |
---|---|
TInput | Type of ingoing data. |
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);
public RowDuplication()
public RowDuplication(int numberOfDuplicates)
Type | Name | Description |
---|---|---|
int | numberOfDuplicates | Sets the NumberOfDuplicates |
public RowDuplication(Predicate<TInput> canDuplicate)
Type | Name | Description |
---|---|---|
Predicate<TInput> | canDuplicate | Sets the CanDuplicate predicate |
public RowDuplication(Predicate<TInput> canDuplicate, int numberOfDuplicates)
Type | Name | Description |
---|---|---|
Predicate<TInput> | canDuplicate | Sets the CanDuplicate predicate |
int | numberOfDuplicates | Sets the NumberOfDuplicates |
A predicate that describe if a will be duplicated or not.
public Predicate<TInput> CanDuplicate { get; set; }
Type | Description |
---|---|
Predicate<TInput> |
Number of duplicates to be created for each ingoing row. Default is 1 (meaning the incoming row plus one copy).
public int NumberOfDuplicates { get; set; }
Type | Description |
---|---|
int |
SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.
public override ISourceBlock<TInput> SourceBlock { get; }
Type | Description |
---|---|
ISourceBlock<TInput> |
TargetBlock from the underlying TPL.Dataflow which is used as input buffer for the component.
public override ITargetBlock<TInput> TargetBlock { get; }
Type | Description |
---|---|
ITargetBlock<TInput> |
protected override void CheckParameter()
protected override void CleanUpOnFaulted(Exception e)
Type | Name | Description |
---|---|---|
Exception | e |
protected override void CleanUpOnSuccess()
protected override void InitComponent()