Class SepaStatementEntryComparer

Namespace
Subsembly.Sepa
Assembly
Subsembly.Sepa.dll

An IComparer implementation that can be used to sort SepaStatementEntrys based on their BookingDate.

public class SepaStatementEntryComparer : IComparer, IComparer<SepaStatementEntry>
Inheritance
SepaStatementEntryComparer
Implements
Inherited Members

Remarks

This does not provide a stable order. Hence, it shall only be used on completely unsorted SepaStatementEntry collections.

If an SepaStatementEntry does not have a BookingDate, then the ValueDate is considered, instead. If it has neither date, then it will be compared as DateTime.MaxValue.

If two SepaStatementEntrys are equal based on their date, then the StatusCode is compared, in order to ensure that pending entries are always after booked entries at the same date.

Methods

Compare(SepaStatementEntry, SepaStatementEntry)

public int Compare(SepaStatementEntry x, SepaStatementEntry y)

Parameters

x SepaStatementEntry
y SepaStatementEntry

Returns

int

Compare(object, object)

public int Compare(object x, object y)

Parameters

x object
y object

Returns

int