docs.unity3d.com
    Show / Hide Table of Contents

    Class LinqUtility

    Inheritance
    Object
    LinqUtility
    Namespace: Ludiq
    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>, T[])

    Declaration
    public static void AddRange<T>(this ICollection<T> collection, params T[] items)
    Parameters
    Type Name Description
    ICollection<T> collection
    T[] items
    Type Parameters
    Name Description
    T

    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
    Name Description
    T

    AllZipped<TFirst, TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, Boolean>)

    Declaration
    public static bool AllZipped<TFirst, TSecond>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, bool> predicate)
    Parameters
    Type Name Description
    IEnumerable<TFirst> first
    IEnumerable<TSecond> second
    Func<TFirst, TSecond, Boolean> predicate
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    TFirst
    TSecond

    AllZippedLongest<TFirst, TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, Boolean>)

    Declaration
    public static bool AllZippedLongest<TFirst, TSecond>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, bool> predicate)
    Parameters
    Type Name Description
    IEnumerable<TFirst> first
    IEnumerable<TSecond> second
    Func<TFirst, TSecond, Boolean> predicate
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    TFirst
    TSecond

    AnyZipped<TFirst, TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, Boolean>)

    Declaration
    public static bool AnyZipped<TFirst, TSecond>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, bool> predicate)
    Parameters
    Type Name Description
    IEnumerable<TFirst> first
    IEnumerable<TSecond> second
    Func<TFirst, TSecond, Boolean> predicate
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    TFirst
    TSecond

    AnyZippedLongest<TFirst, TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, Boolean>)

    Declaration
    public static bool AnyZippedLongest<TFirst, TSecond>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, bool> predicate)
    Parameters
    Type Name Description
    IEnumerable<TFirst> first
    IEnumerable<TSecond> second
    Func<TFirst, TSecond, Boolean> predicate
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    TFirst
    TSecond

    AsReadOnlyArray<T>(IEnumerable<T>)

    Declaration
    public static T[] AsReadOnlyArray<T>(this IEnumerable<T> enumerable)
    Parameters
    Type Name Description
    IEnumerable<T> enumerable
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    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
    Name Description
    T

    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
    Name Description
    T

    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
    Name Description
    T

    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
    Name Description
    T

    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
    Name Description
    T

    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
    Name Description
    T

    Chunk<T>(IList<T>, Int32)

    Declaration
    public static List<List<T>> Chunk<T>(this IList<T> collection, int chunkCount)
    Parameters
    Type Name Description
    IList<T> collection
    Int32 chunkCount
    Returns
    Type Description
    List<List<T>>
    Type Parameters
    Name Description
    T

    Concat<T>(IEnumerable<T>[])

    Declaration
    public static IEnumerable<T> Concat<T>(params IEnumerable<T>[] enumerables)
    Parameters
    Type Name Description
    IEnumerable<T>[] enumerables
    Returns
    Type Description
    IEnumerable<T>
    Type Parameters
    Name Description
    T

    Concat<T>(IEnumerable[])

    Declaration
    public static IEnumerable<T> Concat<T>(params IEnumerable[] enumerables)
    Parameters
    Type Name Description
    IEnumerable[] enumerables
    Returns
    Type Description
    IEnumerable<T>
    Type Parameters
    Name Description
    T

    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
    Name Description
    T
    TKey

    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
    Name Description
    T

    ForceEvaluation<T>(IEnumerable<T>)

    Declaration
    public static ICollection<T> ForceEvaluation<T>(this IEnumerable<T> source)
    Parameters
    Type Name Description
    IEnumerable<T> source
    Returns
    Type Description
    ICollection<T>
    Type Parameters
    Name Description
    T

    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
    Name Description
    T

    Join<T>(IEnumerable<T>, String)

    Declaration
    public static string Join<T>(this IEnumerable<T> source, string separator)
    Parameters
    Type Name Description
    IEnumerable<T> source
    String separator
    Returns
    Type Description
    String
    Type Parameters
    Name Description
    T

    None<T>(IEnumerable<T>)

    Declaration
    public static bool None<T>(this IEnumerable<T> source)
    Parameters
    Type Name Description
    IEnumerable<T> source
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    T

    None<T>(IEnumerable<T>, Func<T, Boolean>)

    Declaration
    public static bool None<T>(this IEnumerable<T> source, Func<T, bool> predicate)
    Parameters
    Type Name Description
    IEnumerable<T> source
    Func<T, Boolean> predicate
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    T

    NotAll<T>(IEnumerable<T>, Func<T, Boolean>)

    Declaration
    public static bool NotAll<T>(this IEnumerable<T> source, Func<T, bool> predicate)
    Parameters
    Type Name Description
    IEnumerable<T> source
    Func<T, Boolean> predicate
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    T

    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
    Name Description
    T

    OfType<T>(IEnumerable<T>, Type)

    Declaration
    public static IEnumerable<T> OfType<T>(this IEnumerable<T> source, Type type)
    Parameters
    Type Name Description
    IEnumerable<T> source
    Type type
    Returns
    Type Description
    IEnumerable<T>
    Type Parameters
    Name Description
    T

    OrderByDependencies<T>(IEnumerable<T>, Func<T, IEnumerable<T>>, Boolean)

    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
    Boolean throwOnCycle
    Returns
    Type Description
    IEnumerable<T>
    Type Parameters
    Name Description
    T

    OrderByDependers<T>(IEnumerable<T>, Func<T, IEnumerable<T>>, Boolean)

    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
    Boolean throwOnCycle
    Returns
    Type Description
    IEnumerable<T>
    Type Parameters
    Name Description
    T

    PeekOrDefault<T>(Queue<T>)

    Declaration
    public static T PeekOrDefault<T>(this Queue<T> queue)
    Parameters
    Type Name Description
    System.Collections.Queue<T> queue
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    PeekOrDefault<T>(Stack<T>)

    Declaration
    public static T PeekOrDefault<T>(this Stack<T> stack)
    Parameters
    Type Name Description
    System.Collections.Stack<T> stack
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Permutations<T>(IEnumerable<T>)

    Declaration
    public static IEnumerable<T[]> Permutations<T>(this IEnumerable<T> source)
    Parameters
    Type Name Description
    IEnumerable<T> source
    Returns
    Type Description
    IEnumerable<T[]>
    Type Parameters
    Name Description
    T

    Predicate<T>(IEnumerable<T>, Func<T, Boolean>, SequencePredicate)

    Declaration
    public static bool Predicate<T>(this IEnumerable<T> source, Func<T, bool> predicate, SequencePredicate predicateType)
    Parameters
    Type Name Description
    IEnumerable<T> source
    Func<T, Boolean> predicate
    SequencePredicate predicateType
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    T

    Random<T>(IEnumerable<T>)

    Declaration
    public static T Random<T>(this IEnumerable<T> source)
    Parameters
    Type Name Description
    IEnumerable<T> source
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    ToDictionary<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>>, Boolean)

    Declaration
    public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, bool throwOnDuplicates = true)
    Parameters
    Type Name Description
    IEnumerable<KeyValuePair<TKey, TValue>> items
    Boolean throwOnDuplicates
    Returns
    Type Description
    Dictionary<TKey, TValue>
    Type Parameters
    Name Description
    TKey
    TValue

    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
    Name Description
    T

    ToValueIndexPairs<T>(IEnumerable<T>)

    Declaration
    public static IEnumerable<KeyValuePair<T, int>> ToValueIndexPairs<T>(this IEnumerable<T> items)
    Parameters
    Type Name Description
    IEnumerable<T> items
    Returns
    Type Description
    IEnumerable<KeyValuePair<T, Int32>>
    Type Parameters
    Name Description
    T

    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
    Name Description
    T

    ZipLongest<TFirst, TSecond, TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, TResult>, TFirst, TSecond)

    Declaration
    public static IEnumerable<TResult> ZipLongest<TFirst, TSecond, TResult>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector, TFirst firstPlaceholder = null, TSecond secondPlaceholder = null)
    Parameters
    Type Name Description
    IEnumerable<TFirst> first
    IEnumerable<TSecond> second
    Func<TFirst, TSecond, TResult> resultSelector
    TFirst firstPlaceholder
    TSecond secondPlaceholder
    Returns
    Type Description
    IEnumerable<TResult>
    Type Parameters
    Name Description
    TFirst
    TSecond
    TResult
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023