ComparerChainingExtensions Class

Summary

Convenience class to help chain selectors onto existing parent comparers.
Namespace
ReactiveUI
Base Types
  • object
graph BT Type-->Base0["object"] Type["ComparerChainingExtensions"] class Type type-node

Syntax

public static class ComparerChainingExtensions

Methods

Name Value Summary
ThenBy<T, TValue>(IComparer<T>, Func<T, TValue>) IComparer<T>
Creates a derived comparer based on the given parent comparer. The returned comparer will sort elements using the parent comparer first. If the parent considers the values equal elements will be sorted in ascending order based on the values returned by the provided selector. The selector values will be compared using the default comparer for the return type of the selector.
static
ThenBy<T, TValue>(IComparer<T>, Func<T, TValue>, IComparer<TValue>) IComparer<T>
Creates a derived comparer based on the given parent comparer. The returned comparer will sort elements using the parent comparer first. If the parent considers the values equal elements will be sorted in ascending order based on the values returned by the provided selector. The selector values will be compared using the provided comparer or the default comparer for the return type of the selector if no comparer is specified.
static
ThenByDescending<T, TValue>(IComparer<T>, Func<T, TValue>) IComparer<T>
Creates a derived comparer based on the given parent comparer. The returned comparer will sort elements using the parent comparer first. If the parent considers the values equal elements will be sorted in descending order based on the values returned by the provided selector. The selector values will be compared using the default comparer for the return type of the selector.
static
ThenByDescending<T, TValue>(IComparer<T>, Func<T, TValue>, IComparer<TValue>) IComparer<T>
Creates a derived comparer based on the given parent comparer. The returned comparer will sort elements using the parent comparer first. If the parent considers the values equal elements will be sorted in descending order based on the values returned by the provided selector. The selector values will be compared using the provided comparer or the default comparer for the return type of the selector if no comparer is specified.
static