Sort<TInput>
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
Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
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
Sort(Comparison<TInput>)
Declaration
Parameters
Type | Name | Description |
---|---|---|
Comparison<TInput> | sortFunction | Will set the SortFunction |
Properties
MaxBufferSize
Declaration
Property Value
Type | Description |
---|---|
int |
ProgressCount
Declaration
Property Value
Type | Description |
---|---|
int |
SortColumns
Declaration
Property Value
Type | Description |
---|---|
ICollection<SortColumn> |
SortFunction
A System.Comparison used to sort the data. This will always be used first, even if SortColumns are provided.
Declaration
Property Value
Type | Description |
---|---|
Comparison<TInput> |
SourceBlock
SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.
Declaration
Property Value
Type | Description |
---|---|
ISourceBlock<TInput> |
Overrides
TargetBlock
TargetBlock from the underlying TPL.Dataflow which is used as input buffer for the component.
Declaration
Property Value
Type | Description |
---|---|
ITargetBlock<TInput> |
Overrides
Methods
CheckParameter()
Declaration
Overrides
CleanUpOnFaulted(Exception)
Declaration
Parameters
Type | Name | Description |
---|---|---|
Exception | e |
Overrides
CleanUpOnSuccess()
Declaration
Overrides
InitComponent()
Declaration
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
Parameters
Type | Name | Description |
---|---|---|
IDataFlowDestination<ETLBoxError> | target | The target for erroneous rows. |
Returns
Type | Description |
---|---|
IDataFlowSource<ETLBoxError> | The linked component. |