OrderedComparer Class

Summary

Convenience class providing a starting point for chaining comparers for anonymous types.
Namespace
ReactiveUI
Base Types
  • object
graph BT Type-->Base0["object"] Type["OrderedComparer"] class Type type-node

Syntax

[SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleType", Justification = "Classes with the same class names within.")]
public static class 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.

Attributes

Type Description
SuppressMessageAttribute

Methods

Name Value Summary
For<T>() IComparerBuilder<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 OrdedComparer class.
static
For<T>(IEnumerable<T>) IComparerBuilder<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.
static