Class LinqUtility
Inheritance
object
LinqUtility
Assembly: solution.dll
Syntax
public static class LinqUtility
Methods
AddRange(IList, IEnumerable)
Declaration
public static void AddRange(this IList list, IEnumerable items)
Parameters
| Type |
Name |
Description |
| IList |
list |
|
| IEnumerable |
items |
|
AddRange<T>(ICollection<T>, IEnumerable<T>)
Declaration
public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T> items)
Parameters
| Type |
Name |
Description |
| ICollection<T> |
collection |
|
| IEnumerable<T> |
items |
|
Type Parameters
AsReadOnlyCollection<T>(IEnumerable<T>)
Declaration
public static ICollection<T> AsReadOnlyCollection<T>(this IEnumerable<T> enumerable)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
enumerable |
|
Returns
| Type |
Description |
| ICollection<T> |
|
Type Parameters
AsReadOnlyList<T>(IEnumerable<T>)
Declaration
public static IList<T> AsReadOnlyList<T>(this IEnumerable<T> enumerable)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
enumerable |
|
Returns
| Type |
Description |
| IList<T> |
|
Type Parameters
CatchAsLogError<T>(IEnumerable<T>, string)
Declaration
public static IEnumerable<T> CatchAsLogError<T>(this IEnumerable<T> source, string message)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
source |
|
| string |
message |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
CatchAsLogWarning<T>(IEnumerable<T>, string)
Declaration
public static IEnumerable<T> CatchAsLogWarning<T>(this IEnumerable<T> source, string message)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
source |
|
| string |
message |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
Catch<T>(IEnumerable<T>, ICollection<Exception>)
Declaration
public static IEnumerable<T> Catch<T>(this IEnumerable<T> source, ICollection<Exception> exceptions)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
source |
|
| ICollection<Exception> |
exceptions |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
Catch<T>(IEnumerable<T>, Action<Exception>)
Declaration
public static IEnumerable<T> Catch<T>(this IEnumerable<T> source, Action<Exception> @catch)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
source |
|
| Action<Exception> |
catch |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
Concat<T>(params IEnumerable[])
Declaration
public static IEnumerable<T> Concat<T>(params IEnumerable[] enumerables)
Parameters
| Type |
Name |
Description |
| IEnumerable[] |
enumerables |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
DistinctBy<T, TKey>(IEnumerable<T>, Func<T, TKey>)
Declaration
public static IEnumerable<T> DistinctBy<T, TKey>(this IEnumerable<T> items, Func<T, TKey> property)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
items |
|
| Func<T, TKey> |
property |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
Flatten<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
Declaration
public static IEnumerable<T> Flatten<T>(this IEnumerable<T> source, Func<T, IEnumerable<T>> childrenSelector)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
source |
|
| Func<T, IEnumerable<T>> |
childrenSelector |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
IntersectAll<T>(IEnumerable<IEnumerable<T>>)
Declaration
public static IEnumerable<T> IntersectAll<T>(this IEnumerable<IEnumerable<T>> groups)
Parameters
| Type |
Name |
Description |
| IEnumerable<IEnumerable<T>> |
groups |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
NotNull<T>(IEnumerable<T>)
Declaration
public static IEnumerable<T> NotNull<T>(this IEnumerable<T> enumerable)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
enumerable |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
OrderByDependencies<T>(IEnumerable<T>, Func<T, IEnumerable<T>>, bool)
Declaration
public static IEnumerable<T> OrderByDependencies<T>(this IEnumerable<T> source, Func<T, IEnumerable<T>> getDependencies, bool throwOnCycle = true)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
source |
|
| Func<T, IEnumerable<T>> |
getDependencies |
|
| bool |
throwOnCycle |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
OrderByDependers<T>(IEnumerable<T>, Func<T, IEnumerable<T>>, bool)
Declaration
public static IEnumerable<T> OrderByDependers<T>(this IEnumerable<T> source, Func<T, IEnumerable<T>> getDependers, bool throwOnCycle = true)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
source |
|
| Func<T, IEnumerable<T>> |
getDependers |
|
| bool |
throwOnCycle |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters
ToHashSet<T>(IEnumerable<T>)
Declaration
public static HashSet<T> ToHashSet<T>(this IEnumerable<T> enumerable)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
enumerable |
|
Returns
| Type |
Description |
| HashSet<T> |
|
Type Parameters
Yield<T>(T)
Declaration
public static IEnumerable<T> Yield<T>(this T t)
Parameters
| Type |
Name |
Description |
| T |
t |
|
Returns
| Type |
Description |
| IEnumerable<T> |
|
Type Parameters