LinqExtensions

Various LinQ extensions.

namespace Sirenix.Utilities
{
[ExtensionAttribute]
public static class LinqExtensions
}

Requirements

Namespace: Sirenix.Utilities
Assembly: Sirenix.OdinInspector
Version: 2.0.0.0

Extension Methods

Return Type Definition Description
void AddRange<T>(this HashSet<T>, IEnumerable<T>) Adds a collection to a hashset.
IEnumerable<T> AppendIf<T>(this IEnumerable<T>, bool, Func<T>) Add an item to the end of a collection if a condition is met.
IEnumerable<T> AppendIf<T>(this IEnumerable<T>, bool, IEnumerable<T>) Add a collection to the end of another collection if a condition is met.
IEnumerable<T> AppendIf<T>(this IEnumerable<T>, bool, T) Add an item to the end of a collection if a condition is met.
IEnumerable<T> AppendIf<T>(this IEnumerable<T>, Func<bool>, Func<T>) Add an item to the end of a collection if a condition is met.
IEnumerable<T> AppendIf<T>(this IEnumerable<T>, Func<bool>, IEnumerable<T>) Add a collection to the end of another collection if a condition is met.
IEnumerable<T> AppendIf<T>(this IEnumerable<T>, Func<bool>, T) Add an item to the end of a collection if a condition is met.
IEnumerable<T> AppendWith<T>(this IEnumerable<T>, Func<T>) Add an item to the end of a collection.
IEnumerable<T> AppendWith<T>(this IEnumerable<T>, IEnumerable<T>) Add a collection to the end of another collection.
IEnumerable<T> AppendWith<T>(this IEnumerable<T>, T) Add an item to the end of a collection.
IEnumerable<T> Convert<T>(this IEnumerable, Func<Object, T>) Convert each item in the collection.
IEnumerable<T> Examine<T>(this IEnumerable<T>, Action<T>) Calls an action on each item before yielding them.
IEnumerable<T> FilterCast<T>(this IEnumerable) Returns and casts only the items of type <typeparamref>(19384,8).
IEnumerable<T> ForEach<T>(this IEnumerable<T>, Action<T, int>) Perform an action on each item.
IEnumerable<T> ForEach<T>(this IEnumerable<T>, Action<T>) Perform an action on each item.
bool IsNullOrEmpty<T>(this IList<T>) Returns true if the list is either null or empty. Otherwise false.
void Populate<T>(this IList<T>, T) Sets all items in the list to the given value.
IEnumerable<T> Prepend<T>(this IEnumerable<T>, Func<T>) Add an item to the beginning of a collection.
IEnumerable<T> Prepend<T>(this IEnumerable<T>, IEnumerable<T>) Add a collection to the beginning of another collection.
IEnumerable<T> Prepend<T>(this IEnumerable<T>, T) Add an item to the beginning of a collection.
IEnumerable<T> PrependIf<T>(this IEnumerable<T>, bool, Func<T>) Add an item to the beginning of another collection, if a condition is met.
IEnumerable<T> PrependIf<T>(this IEnumerable<T>, bool, IEnumerable<T>) Add a collection to the beginning of another collection, if a condition is met.
IEnumerable<T> PrependIf<T>(this IEnumerable<T>, bool, T) Add an item to the beginning of another collection, if a condition is met.
IEnumerable<T> PrependIf<T>(this IEnumerable<T>, Func<bool>, Func<T>) Add an item to the beginning of another collection, if a condition is met.
IEnumerable<T> PrependIf<T>(this IEnumerable<T>, Func<bool>, IEnumerable<T>) Add a collection to the beginning of another collection, if a condition is met.
IEnumerable<T> PrependIf<T>(this IEnumerable<T>, Func<bool>, T) Add an item to the beginning of another collection, if a condition is met.
IEnumerable<T> PrependIf<T>(this IEnumerable<T>, Func<IEnumerable<T>, bool>, Func<T>) Add an item to the beginning of another collection, if a condition is met.
IEnumerable<T> PrependIf<T>(this IEnumerable<T>, Func<IEnumerable<T>, bool>, IEnumerable<T>) Add a collection to the beginning of another collection, if a condition is met.
IEnumerable<T> PrependIf<T>(this IEnumerable<T>, Func<IEnumerable<T>, bool>, T) Add an item to the beginning of another collection, if a condition is met.
void Sort<T>(this IList<T>) Sorts an IList
void Sort<T>(this IList<T>, Comparison<T>) Sorts an IList
HashSet<T> ToHashSet<T>(this IEnumerable<T>) Convert a colletion to a HashSet.
HashSet<T> ToHashSet<T>(this IEnumerable<T>, IEqualityComparer<T>) Convert a colletion to a HashSet.
ImmutableList<T> ToImmutableList<T>(this IEnumerable<T>) Convert a collection to an immutable list.