Class Sort<TInput>
Sorts the incoming data with by the given comparison function. This is a blocking transformation - no output will be produced until all input data has arrived in the transformation.
Implements
IDataFlowTransformation<TInput, TInput>
IDataFlowSource<TInput>
IDataFlowDestination<TInput>
Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
public class Sort<TInput> : DataFlowTransformation<TInput, TInput>, IDataFlowLogging, IDataFlowTransformation<TInput, TInput>, IDataFlowSource<TInput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, ILoggableTask
Type Parameters
Name | Description |
---|---|
TInput | Type of ingoing (and also outgoing) data. |
Examples
Comparison<MyDataRow> comp = new Comparison<MyDataRow>(
(x, y) => y.Value2 - x.Value2
);
Sort<MyDataRow> block = new Sort<MyDataRow>(comp);
Constructors
Sort()
Declaration
public Sort()
Sort(Comparison<TInput>)
Declaration
public Sort(Comparison<TInput> sortFunction)
Parameters
Type | Name | Description |
---|---|---|
Comparison<TInput> | sortFunction | Will set the SortFunction |
Properties
MaxBufferSize
Declaration
public int MaxBufferSize { get; }
Property Value
Type | Description |
---|---|
int |
ProgressCount
Declaration
public int ProgressCount { get; }
Property Value
Type | Description |
---|---|
int |
SortFunction
A System.Comparison used to sort the data.
Declaration
public Comparison<TInput> SortFunction { get; set; }
Property Value
Type | Description |
---|---|
Comparison<TInput> |
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
Type | Description |
---|---|
ISourceBlock<TInput> |
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
Type | Description |
---|---|
ITargetBlock<TInput> |
Overrides
Methods
CheckParameter()
Declaration
protected override void CheckParameter()
Overrides
CleanUpOnFaulted(Exception)
Declaration
protected override void CleanUpOnFaulted(Exception e)
Parameters
Type | Name | Description |
---|---|---|
Exception | e |
Overrides
CleanUpOnSuccess()
Declaration
protected override void CleanUpOnSuccess()
Overrides
InitComponent()
Declaration
protected override void InitComponent()
Overrides
LinkErrorTo(IDataFlowDestination<ETLBoxError>)
If an error occurs in the component, by default the component will throw an exception and stop execution. If you use the error linking, any erroneous records will be caught and redirected.
Declaration
public override IDataFlowSource<ETLBoxError> LinkErrorTo(IDataFlowDestination<ETLBoxError> target)
Parameters
Type | Name | Description |
---|---|---|
IDataFlowDestination<ETLBoxError> | target | The target for erroneous rows. |
Returns
Type | Description |
---|---|
IDataFlowSource<ETLBoxError> | The linked component. |
Overrides
Reset()
Declaration
protected override void Reset()