Class OrderedComparer
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
Convenience class providing a starting point for chaining comparers for anonymous types.
- Inheritance
-
Ordered
Comparer
Remarks
If the type you're creating a comparer for is known this class is nothing more than an alias for the generic OrderedComparer. This class can be used to create comparers for anonymous types.
Methods
For<T>()
Creates a comparer builder for the specified type. Note that the builder is not a comparer in itself, you need to use the OrderBy or OrderByDescending methods on the builder to get an actual comparer. If the type is known at compile time this method is nothing more than an alias for the generic OrderedComparer class.
Returns
- IComparer
Builder <T> A comparer builder.
Type Parameters
T
The comparison type.
For<T>(IEnumerable<T>)
Creates a type inferred comparer builder for the element type of the enumerable. Useful for creating comparers for anonymous types. Note that the builder is not a comparer in itself, you need to use the OrderBy or OrderByDescending methods on the builder to get an actual comparer.
Parameters
enumerable
IEnumerable<T>The enumerable.
Returns
- IComparer
Builder <T> A comparer builder.
Type Parameters
T
The type.