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

ListEx Class

Summary

Extensions to help with maintenance of a list.
Namespace
DynamicData
Base Types
  • object
graph BT Type-->Base0["object"] Type["ListEx"] class Type type-node

Syntax

public static class ListEx

Methods

Name Value Summary
Add<T>(IList<T>, IEnumerable<T>) void
Adds the items to the specified list.
static
AddOrInsertRange<T>(IList<T>, IEnumerable<T>, int) void
Adds the range if a negative is specified, otherwise the range is added at the end of the list.
static
AddRange<T>(IList<T>, IEnumerable<T>) void
Adds the range to the source ist.
static
AddRange<T>(IList<T>, IEnumerable<T>, int) void
Adds the range to the list. The starting range is at the specified index.
static
BinarySearch<TItem, TSearch>(IList<TItem>, TSearch, Func<TSearch, TItem, 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.
static
BinarySearch<TItem>(IList<TItem>, TItem) int
Performs a binary search on the specified collection.
static
BinarySearch<TItem>(IList<TItem>, TItem, IComparer<TItem>) int
Performs a binary search on the specified collection.
static
Clone<T>(IList<T>, IChangeSet<T>) void
Clones the list from the specified change set.
static
Clone<T>(IList<T>, IChangeSet<T>, IEqualityComparer<T>?) void
Clones the list from the specified change set.
static
Clone<T>(IList<T>, IEnumerable<Change<T>>, IEqualityComparer<T>?) void
Clones the list from the specified enumerable of changes.
static
IndexOf<T>(IEnumerable<T>, T) int
Finds the index of the current item using the specified equality comparer.
static
IndexOf<T>(IEnumerable<T>, T, IEqualityComparer<T>) int
Finds the index of the current item using the specified equality comparer.
static
IndexOfOptional<T>(IEnumerable<T>, T, IEqualityComparer<T>?) Optional<ItemWithIndex<T>>
Lookups the item using the specified comparer. If matched, the item's index is also returned.
static
Remove<T>(IList<T>, IEnumerable<T>) void
Removes the items from the specified list.
static
RemoveMany<T>(IList<T>, IEnumerable<T>) void
Removes many items from the collection in an optimal way.
static
Replace<T>(IList<T>, T, T) void
Replaces the specified item.
static
Replace<T>(IList<T>, T, T, IEqualityComparer<T>) void
Replaces the specified item.
static
ReplaceOrAdd<T>(IList<T>, T, T) void
Replaces the item if found, otherwise the item is added to the list.
static

Extension Methods

Name Value Summary
InvokeViewModelAction<T>(Action<T>) object
This is a thing I lifted from Prism.