Table of Contents

Class OrderedComparer

Namespace
ReactiveUI
Assembly
ReactiveUI.dll

Convenience class providing a starting point for chaining comparers for anonymous types.

public static class OrderedComparer : Object
Inheritance
OrderedComparer

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.

public static IComparerBuilder<T> For<T>()

Returns

IComparerBuilder<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.

public static IComparerBuilder<T> For<T>(IEnumerable<T> enumerable)

Parameters

enumerable IEnumerable<T>

The enumerable.

Returns

IComparerBuilder<T>

A comparer builder.

Type Parameters

T

The type.