The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

SortExpressionComparer<T> Class

Summary

Generic sort expression to help create inline sorting for the .Sort(IComparer comparer) operator.
Namespace
DynamicData.Binding
Interfaces
Base Types
graph BT Type-->Base0["List<SortExpression<T>>"] Base0-->Base1["object"] Type-.->Interface0["IList<SortExpression<T>>"] Type-.->Interface1["ICollection<SortExpression<T>>"] Type-.->Interface2["IList"] Type-.->Interface3["ICollection"] Type-.->Interface4["IReadOnlyList<SortExpression<T>>"] Type-.->Interface5["IReadOnlyCollection<SortExpression<T>>"] Type-.->Interface6["IEnumerable<SortExpression<T>>"] Type-.->Interface7["IEnumerable"] Type-.->Interface8["IComparer<T>"] Type["SortExpressionComparer<T>"] class Type type-node

Syntax

public class SortExpressionComparer<T> : List<SortExpression<T>>, IList<SortExpression<T>>, 
    ICollection<SortExpression<T>>, IList, ICollection, IReadOnlyList<SortExpression<T>>, 
    IReadOnlyCollection<SortExpression<T>>, IEnumerable<SortExpression<T>>, IEnumerable, 
    IComparer<T>

Type Parameters

Name Description
T The item to sort against.

Methods

Name Value Summary
Ascending(Func<T, IComparable>) SortExpressionComparer<T>
Create an ascending sort expression.
static
Compare(T?, T?) int
Descending(Func<T, IComparable>) SortExpressionComparer<T>
Create an descending sort expression.
static
ThenByAscending(Func<T, IComparable>) SortExpressionComparer<T>
Adds an additional ascending sort expression.
ThenByDescending(Func<T, IComparable>) SortExpressionComparer<T>
Adds an additional descending sort expression.

Extension Methods

Name Value Summary
Add<SortExpression<T>>(IEnumerable<SortExpression<T>>) void
Adds the items to the specified list.
From ListEx
AddOrInsertRange<SortExpression<T>>(IEnumerable<SortExpression<T>>, int) void
Adds the range if a negative is specified, otherwise the range is added at the end of the list.
From ListEx
AddRange<SortExpression<T>>(IEnumerable<SortExpression<T>>) void
Adds the range to the source ist.
From ListEx
AddRange<SortExpression<T>>(IEnumerable<SortExpression<T>>, int) void
Adds the range to the list. The starting range is at the specified index.
From ListEx
AsArray<SortExpression<T>>() T[]
Casts the enumerable to an array if it is already an array. Otherwise call ToArray.
AsList<SortExpression<T>>() List<T>
Casts the enumerable to an array if it is already an array. Otherwise call ToList.
AsObservableChangeSet<SortExpression<T>, TKey>(Func<SortExpression<T>, TKey>, bool) IObservable<IChangeSet<TObject, TKey>>
Converts the enumerable to an observable change set. Generates a snapshot in time based of enumerable.
AsObservableChangeSet<SortExpression<T>>(bool) IObservable<IChangeSet<TObject>>
Converts the enumerable to an observable change set. Generates a snapshot in time based of enumerable.
BinarySearch<SortExpression<T>, TSearch>(TSearch, Func<TSearch, SortExpression<T>, int>) int
Performs a binary search on the specified collection. Thanks to http://stackoverflow.com/questions/967047/how-to-perform-a-binary-search-on-ilistt.
From ListEx
BinarySearch<SortExpression<T>>(SortExpression<T>) int
Performs a binary search on the specified collection.
From ListEx
BinarySearch<SortExpression<T>>(SortExpression<T>, IComparer<SortExpression<T>>) int
Performs a binary search on the specified collection.
From ListEx
BindCommand<SortExpressionComparer<T>, TViewModel, TProp, TControl, TParam>(TViewModel?, Expression<Func<TViewModel, TProp?>>, Expression<Func<SortExpressionComparer<T>, TControl>>, Expression<Func<TViewModel, TParam?>>, string?) IReactiveBinding<TView, TProp>
Bind a command from the ViewModel to an explicitly specified control on the View.
BindCommand<SortExpressionComparer<T>, TViewModel, TProp, TControl, TParam>(TViewModel?, Expression<Func<TViewModel, TProp?>>, Expression<Func<SortExpressionComparer<T>, TControl>>, IObservable<TParam?>, string?) IReactiveBinding<TView, TProp>
Bind a command from the ViewModel to an explicitly specified control on the View.
BindCommand<SortExpressionComparer<T>, TViewModel, TProp, TControl>(TViewModel?, Expression<Func<TViewModel, TProp?>>, Expression<Func<SortExpressionComparer<T>, TControl>>, string?) IReactiveBinding<TView, TProp>
Bind a command from the ViewModel to an explicitly specified control on the View.
BindValidation<SortExpressionComparer<T>, TViewModel, TViewModelProperty, TViewProperty>(TViewModel?, Expression<Func<TViewModel, TViewModelProperty>>, Expression<Func<SortExpressionComparer<T>, TViewProperty>>, IValidationTextFormatter<string>?) IDisposable
Binds the specified ViewModel property validation to the View property.
BindValidation<SortExpressionComparer<T>, TViewModel, TViewModelProperty>(TViewModel?, Expression<Func<TViewModel, TViewModelProperty>>, TextInputLayout, IValidationTextFormatter<string>?) IDisposable
Platform binding to the TextInputLayout.
BindValidation<SortExpressionComparer<T>, TViewModel, TViewModelProperty>(TViewModel?, Expression<Func<TViewModel, TViewModelProperty>>, TextInputLayout, IValidationTextFormatter<string>?) IDisposable
Platform binding to the TextInputLayout.
BindValidation<SortExpressionComparer<T>, TViewModel, TViewProperty>(TViewModel?, Expression<Func<SortExpressionComparer<T>, TViewProperty>>, IValidationTextFormatter<string>?) IDisposable
Binds the overall validation of a ViewModel to a specified View property.
BindValidation<SortExpressionComparer<T>, TViewModel, TViewProperty>(TViewModel?, Expression<Func<TViewModel?, ValidationHelper>>, Expression<Func<SortExpressionComparer<T>, TViewProperty>>, IValidationTextFormatter<string>?) IDisposable
Binds a ValidationHelper from a ViewModel to a specified View property.
BindValidation<SortExpressionComparer<T>, TViewModel>(TViewModel?, Expression<Func<TViewModel?, ValidationHelper>>, TextInputLayout, IValidationTextFormatter<string>?) IDisposable
Platform binding to the TextInputLayout.
BindValidation<SortExpressionComparer<T>, TViewModel>(TViewModel?, Expression<Func<TViewModel?, ValidationHelper>>, TextInputLayout, IValidationTextFormatter<string>?) IDisposable
Platform binding to the TextInputLayout.
BindValidationEx<SortExpressionComparer<T>, TViewModel, TViewModelProperty>(TViewModel?, Expression<Func<TViewModel, TViewModelProperty>>, TextInputLayout, IValidationTextFormatter<string>?) IDisposable
Platform binding to the TextInputLayout.
BindValidationEx<SortExpressionComparer<T>, TViewModel, TViewModelProperty>(TViewModel?, Expression<Func<TViewModel, TViewModelProperty>>, TextInputLayout, IValidationTextFormatter<string>?) IDisposable
Platform binding to the TextInputLayout.
Clone<SortExpression<T>>(IChangeSet<SortExpression<T>>) void
Clones the list from the specified change set.
From ListEx
Clone<SortExpression<T>>(IChangeSet<SortExpression<T>>, IEqualityComparer<SortExpression<T>>?) void
Clones the list from the specified change set.
From ListEx
Clone<SortExpression<T>>(IEnumerable<Change<SortExpression<T>>>, IEqualityComparer<SortExpression<T>>?) void
Clones the list from the specified enumerable of changes.
From ListEx
Duplicates<SortExpression<T>, TValue>(Func<SortExpression<T>, TValue>) IEnumerable<T>
Returns any duplicated values from the source.
FirstOrOptional<SortExpression<T>>(Func<SortExpression<T>, bool>) Optional<T>
Overloads Enumerable.FirstOrDefault() and wraps the result in a Optional &gt;T container.
IndexOf<SortExpression<T>>(SortExpression<T>) int
Finds the index of the current item using the specified equality comparer.
From ListEx
IndexOf<SortExpression<T>>(SortExpression<T>, IEqualityComparer<SortExpression<T>>) int
Finds the index of the current item using the specified equality comparer.
From ListEx
IndexOfMany<SortExpression<T>>(IEnumerable<SortExpression<T>>) IEnumerable<ItemWithIndex<T>>
Finds the index of many items as specified in the secondary enumerable.
IndexOfMany<SortExpression<T>, TResult>(IEnumerable<SortExpression<T>>, Func<SortExpression<T>, int, TResult>) IEnumerable<TResult>
Finds the index of many items as specified in the secondary enumerable.
IndexOfOptional<SortExpression<T>>(SortExpression<T>, IEqualityComparer<SortExpression<T>>?) Optional<ItemWithIndex<T>>
Lookups the item using the specified comparer. If matched, the item's index is also returned.
From ListEx
InvokeViewModelAction<T>(Action<T>) object
This is a thing I lifted from Prism.
Remove<SortExpression<T>>(IEnumerable<SortExpression<T>>) void
Removes the items from the specified list.
From ListEx
RemoveMany<SortExpression<T>>(IEnumerable<SortExpression<T>>) void
Removes many items from the collection in an optimal way.
From ListEx
Replace<SortExpression<T>>(SortExpression<T>, SortExpression<T>) void
Replaces the specified item.
From ListEx
Replace<SortExpression<T>>(SortExpression<T>, SortExpression<T>, IEqualityComparer<SortExpression<T>>) void
Replaces the specified item.
From ListEx
ReplaceOrAdd<SortExpression<T>>(SortExpression<T>, SortExpression<T>) void
Replaces the item if found, otherwise the item is added to the list.
From ListEx
SortBy<SortExpression<T>, TKey>(Func<SortExpression<T>, TKey>) void
With<SortExpressionComparer<T>, TKey, TField>(Dictionary<TKey, TField>, IDictionary<TKey, TField>) TBuilder
Adds the specified dictionary to the provided dictionary.