Summer.Batch.Extra.Sort.SumWriter< T > Class Template Reference
Implementation of a IRecordWriter<T> that can sum similar records using a ISum<T>. More...
Inheritance diagram for Summer.Batch.Extra.Sort.SumWriter< T >:
Public Member Functions | |
SumWriter (IOutputFile< T > outputFile, ISum< T > sum, IComparer< T > comparer) | |
Default constructor. More... | |
void | Write (T record) |
Writes a record. More... | |
void | WriteHeader (IEnumerable< T > header) |
Writes the header More... | |
void | Dispose () |
Releases the used resources. More... | |
Detailed Description
Implementation of a IRecordWriter<T> that can sum similar records using a ISum<T>.
- Template Parameters
-
T type of the records
- Type Constraints
-
T : class
Constructor & Destructor Documentation
Summer.Batch.Extra.Sort.SumWriter< T >.SumWriter | ( | IOutputFile< T > | outputFile, |
ISum< T > | sum, | ||
IComparer< T > | comparer | ||
) |
Default constructor.
- Parameters
-
outputFile The description of the current output file. sum The sum to use for similar items (or null
).comparer The comparer to use for sorting records.
Member Function Documentation
void Summer.Batch.Extra.Sort.SumWriter< T >.Dispose | ( | ) |
Releases the used resources.
void Summer.Batch.Extra.Sort.SumWriter< T >.Write | ( | T | record | ) |
Writes a record.
- Parameters
-
record the record to write
void Summer.Batch.Extra.Sort.SumWriter< T >.WriteHeader | ( | IEnumerable< T > | header | ) |
Writes the header
- Parameters
-
header the header, as a list of records
The documentation for this class was generated from the following file:
- Summer.Batch.Extra/Sort/SumWriter.cs