Class ArchiveRowIteratorComparer
Comparer class used to compare two ArchiveRow objects according to the given orderby criteria. The purpose of this class is to take the .Current element of each iterator and pass it to the ArchiveRowComparer, which handles the actual work. All remarks for that class are valid here as well.
Implements
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoCore.dll
Syntax
public class ArchiveRowIteratorComparer : IComparer<IEnumerator<ArchiveRow>>
Constructors
ArchiveRowIteratorComparer(params ArchiveOrderByInfo[])
Construct the comparer, and set the orderby criteria.
Declaration
public ArchiveRowIteratorComparer(params ArchiveOrderByInfo[] orderBy)
Parameters
Type | Name | Description |
---|---|---|
ArchiveOrderByInfo[] | orderBy | 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 behavior of the sorting algorithm. If the algorithm is 'stable', no change in order will happen; otherwise the final ordering is undefined. |
Methods
Compare(IEnumerator<ArchiveRow>, IEnumerator<ArchiveRow>)
Compare two ArchiveRow elements, via iterators, according to the orderby criteria set
Declaration
public int Compare(IEnumerator<ArchiveRow> x, IEnumerator<ArchiveRow> y)
Parameters
Type | Name | Description |
---|---|---|
IEnumerator<ArchiveRow> | x | Left-hand iterator, whose .Current must be a valid row |
IEnumerator<ArchiveRow> | y | Right-hand iterator, whose .Current must be a valid row |
Returns
Type | Description |
---|---|
int | -1, 0 or 1 according to actual row data order |