Class TypedArchiveRowComparer<RowType>
Comparer class used to compare two ArchiveRow objects according to the given orderby criteria. This class handles comparisons by both OrderByValue and DisplayValue, type harmonization and conversions, and multiple ascending/descending orderby criteria.
If you have a set of archive row iterators, you can use the ArchiveRowIteratorComparer class to sort the iterators according to their .Current rowsImplements
IComparer<RowType>
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoCore.dll
Syntax
public class TypedArchiveRowComparer<RowType> : IComparer<RowType> where RowType : ArchiveRow
Type Parameters
Name | Description |
---|---|
RowType |
Constructors
TypedArchiveRowComparer(params ArchiveOrderByInfo[])
Construct the comparer, and set the orderby criteria.
Declaration
public TypedArchiveRowComparer(params ArchiveOrderByInfo[] orderByInfo)
Parameters
Type | Name | Description |
---|---|---|
ArchiveOrderByInfo[] | orderByInfo | Set of ordering criteria. null is not acceptable. An empty array will cause all elements to be considered equal to another; the final result then depends on the behaviour of the sorting algorithm. If the algorithm is 'stable', no change in order will happen; otherwise the final ordering is undefined. |
Methods
Compare(RowType, RowType)
Compare two ArchiveRow elements according to the orderby criteria set
Declaration
public int Compare(RowType xRow, RowType yRow)
Parameters
Type | Name | Description |
---|---|---|
RowType | xRow | Left-hand row |
RowType | yRow | Right-hand row |
Returns
Type | Description |
---|---|
int | -1, 0 or 1 according to actual row data order |