Show / Hide Table of Contents

    Class EnumerableUtilityExtensions

    This is an extension implementation of the most common methods on the EnumerableUtility class.

    Inheritance
    System.Object
    EnumerableUtilityExtensions
    Namespace: Cuemon.Collections.Generic
    Assembly: Cuemon.Core.dll
    Syntax
    public static class EnumerableUtilityExtensions

    Methods

    | Improve this Doc

    Contains<TSource>(IEnumerable<TSource>, TSource, Func<TSource, TSource, Boolean>)

    Determines whether a sequence contains a specified element by using a specified System.Collections.Generic.IEqualityComparer<T>.

    Declaration
    public static bool Contains<TSource>(this IEnumerable<TSource> source, TSource value, Func<TSource, TSource, bool> condition)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    A sequence in which to locate a value.

    TSource value

    The value to locate in the sequence.

    System.Func<TSource, TSource, System.Boolean> condition

    The function delegate that will compare values from the source sequence with value.

    Returns
    Type Description
    System.Boolean

    true if the source sequence contains an element that has the specified value; otherwise, false.

    Type Parameters
    Name Description
    TSource

    The type of the System.Collections.Generic.IEnumerable<T> of .

    | Improve this Doc

    FindAll<TSource>(IEnumerable<TSource>, Func<TSource, Boolean>)

    Retrieves all the elements that match the conditions defined by the specified predicate.

    Declaration
    public static IEnumerable<TSource> FindAll<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> match)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<TSource, System.Boolean> match

    The function delegate that defines the conditions of the elements to search for.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty System.Collections.Generic.IEnumerable<T>.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    | Improve this Doc

    FindAll<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, Boolean>, T1, T2, T3, T4, T5, T6, T7, T8, T9)

    Retrieves all the elements that match the conditions defined by the specified function delegate.

    Declaration
    public static IEnumerable<TSource> FindAll<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9>(this IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, bool> match, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, System.Boolean> match

    The function delegate that defines the conditions of the elements to search for.

    T1 arg1

    The first parameter of the delegate match.

    T2 arg2

    The second parameter of the delegate match.

    T3 arg3

    The third parameter of the delegate match.

    T4 arg4

    The fourth parameter of the delegate match.

    T5 arg5

    The fifth parameter of the delegate match.

    T6 arg6

    The sixth parameter of the delegate match.

    T7 arg7

    The seventh parameter of the delegate match.

    T8 arg8

    The eighth parameter of the delegate match.

    T9 arg9

    The ninth parameter of the delegate match.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty System.Collections.Generic.IEnumerable<T>.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T1

    The type of the first parameter of the delegate match.

    T2

    The type of the second parameter of the delegate match.

    T3

    The type of the third parameter of the delegate match.

    T4

    The type of the fourth parameter of the delegate match.

    T5

    The type of the fifth parameter of the delegate match.

    T6

    The type of the sixth parameter of the delegate match.

    T7

    The type of the seventh parameter of the delegate match.

    T8

    The type of the eighth parameter of the delegate match.

    T9

    The type of the ninth parameter of the delegate match.

    | Improve this Doc

    FindAll<TSource, T>(IEnumerable<TSource>, Func<TSource, T, Boolean>, T)

    Retrieves all the elements that match the conditions defined by the specified function delegate.

    Declaration
    public static IEnumerable<TSource> FindAll<TSource, T>(this IEnumerable<TSource> source, Func<TSource, T, bool> match, T arg)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<TSource, T, System.Boolean> match

    The function delegate that defines the conditions of the elements to search for.

    T arg

    The first parameter of the delegate match.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty System.Collections.Generic.IEnumerable<T>.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T

    The type of the first parameter of the delegate match.

    | Improve this Doc

    FindAll<TSource, T1, T2>(IEnumerable<TSource>, Func<TSource, T1, T2, Boolean>, T1, T2)

    Retrieves all the elements that match the conditions defined by the specified function delegate.

    Declaration
    public static IEnumerable<TSource> FindAll<TSource, T1, T2>(this IEnumerable<TSource> source, Func<TSource, T1, T2, bool> match, T1 arg1, T2 arg2)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<TSource, T1, T2, System.Boolean> match

    The function delegate that defines the conditions of the elements to search for.

    T1 arg1

    The first parameter of the delegate match.

    T2 arg2

    The second parameter of the delegate match.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty System.Collections.Generic.IEnumerable<T>.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T1

    The type of the first parameter of the delegate match.

    T2

    The type of the second parameter of the delegate match.

    | Improve this Doc

    FindAll<TSource, T1, T2, T3>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, Boolean>, T1, T2, T3)

    Retrieves all the elements that match the conditions defined by the specified function delegate.

    Declaration
    public static IEnumerable<TSource> FindAll<TSource, T1, T2, T3>(this IEnumerable<TSource> source, Func<TSource, T1, T2, T3, bool> match, T1 arg1, T2 arg2, T3 arg3)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<TSource, T1, T2, T3, System.Boolean> match

    The function delegate that defines the conditions of the elements to search for.

    T1 arg1

    The first parameter of the delegate match.

    T2 arg2

    The second parameter of the delegate match.

    T3 arg3

    The third parameter of the delegate match.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty System.Collections.Generic.IEnumerable<T>.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T1

    The type of the first parameter of the delegate match.

    T2

    The type of the second parameter of the delegate match.

    T3

    The type of the third parameter of the delegate match.

    | Improve this Doc

    FindAll<TSource, T1, T2, T3, T4>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, Boolean>, T1, T2, T3, T4)

    Retrieves all the elements that match the conditions defined by the specified function delegate.

    Declaration
    public static IEnumerable<TSource> FindAll<TSource, T1, T2, T3, T4>(this IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, bool> match, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<TSource, T1, T2, T3, T4, System.Boolean> match

    The function delegate that defines the conditions of the elements to search for.

    T1 arg1

    The first parameter of the delegate match.

    T2 arg2

    The second parameter of the delegate match.

    T3 arg3

    The third parameter of the delegate match.

    T4 arg4

    The fourth parameter of the delegate match.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty System.Collections.Generic.IEnumerable<T>.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T1

    The type of the first parameter of the delegate match.

    T2

    The type of the second parameter of the delegate match.

    T3

    The type of the third parameter of the delegate match.

    T4

    The type of the fourth parameter of the delegate match.

    | Improve this Doc

    FindAll<TSource, T1, T2, T3, T4, T5>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, Boolean>, T1, T2, T3, T4, T5)

    Retrieves all the elements that match the conditions defined by the specified function delegate.

    Declaration
    public static IEnumerable<TSource> FindAll<TSource, T1, T2, T3, T4, T5>(this IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, T5, bool> match, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<TSource, T1, T2, T3, T4, T5, System.Boolean> match

    The function delegate that defines the conditions of the elements to search for.

    T1 arg1

    The first parameter of the delegate match.

    T2 arg2

    The second parameter of the delegate match.

    T3 arg3

    The third parameter of the delegate match.

    T4 arg4

    The fourth parameter of the delegate match.

    T5 arg5

    The fifth parameter of the delegate match.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty System.Collections.Generic.IEnumerable<T>.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T1

    The type of the first parameter of the delegate match.

    T2

    The type of the second parameter of the delegate match.

    T3

    The type of the third parameter of the delegate match.

    T4

    The type of the fourth parameter of the delegate match.

    T5

    The type of the fifth parameter of the delegate match.

    | Improve this Doc

    FindAll<TSource, T1, T2, T3, T4, T5, T6>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, Boolean>, T1, T2, T3, T4, T5, T6)

    Retrieves all the elements that match the conditions defined by the specified function delegate.

    Declaration
    public static IEnumerable<TSource> FindAll<TSource, T1, T2, T3, T4, T5, T6>(this IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, T5, T6, bool> match, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<TSource, T1, T2, T3, T4, T5, T6, System.Boolean> match

    The function delegate that defines the conditions of the elements to search for.

    T1 arg1

    The first parameter of the delegate match.

    T2 arg2

    The second parameter of the delegate match.

    T3 arg3

    The third parameter of the delegate match.

    T4 arg4

    The fourth parameter of the delegate match.

    T5 arg5

    The fifth parameter of the delegate match.

    T6 arg6

    The sixth parameter of the delegate match.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty System.Collections.Generic.IEnumerable<T>.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T1

    The type of the first parameter of the delegate match.

    T2

    The type of the second parameter of the delegate match.

    T3

    The type of the third parameter of the delegate match.

    T4

    The type of the fourth parameter of the delegate match.

    T5

    The type of the fifth parameter of the delegate match.

    T6

    The type of the sixth parameter of the delegate match.

    | Improve this Doc

    FindAll<TSource, T1, T2, T3, T4, T5, T6, T7>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, T7, Boolean>, T1, T2, T3, T4, T5, T6, T7)

    Retrieves all the elements that match the conditions defined by the specified function delegate.

    Declaration
    public static IEnumerable<TSource> FindAll<TSource, T1, T2, T3, T4, T5, T6, T7>(this IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, T5, T6, T7, bool> match, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<TSource, T1, T2, T3, T4, T5, T6, T7, System.Boolean> match

    The function delegate that defines the conditions of the elements to search for.

    T1 arg1

    The first parameter of the delegate match.

    T2 arg2

    The second parameter of the delegate match.

    T3 arg3

    The third parameter of the delegate match.

    T4 arg4

    The fourth parameter of the delegate match.

    T5 arg5

    The fifth parameter of the delegate match.

    T6 arg6

    The sixth parameter of the delegate match.

    T7 arg7

    The seventh parameter of the delegate match.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty System.Collections.Generic.IEnumerable<T>.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T1

    The type of the first parameter of the delegate match.

    T2

    The type of the second parameter of the delegate match.

    T3

    The type of the third parameter of the delegate match.

    T4

    The type of the fourth parameter of the delegate match.

    T5

    The type of the fifth parameter of the delegate match.

    T6

    The type of the sixth parameter of the delegate match.

    T7

    The type of the seventh parameter of the delegate match.

    | Improve this Doc

    FindAll<TSource, T1, T2, T3, T4, T5, T6, T7, T8>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, Boolean>, T1, T2, T3, T4, T5, T6, T7, T8)

    Retrieves all the elements that match the conditions defined by the specified function delegate.

    Declaration
    public static IEnumerable<TSource> FindAll<TSource, T1, T2, T3, T4, T5, T6, T7, T8>(this IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, bool> match, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, System.Boolean> match

    The function delegate that defines the conditions of the elements to search for.

    T1 arg1

    The first parameter of the delegate match.

    T2 arg2

    The second parameter of the delegate match.

    T3 arg3

    The third parameter of the delegate match.

    T4 arg4

    The fourth parameter of the delegate match.

    T5 arg5

    The fifth parameter of the delegate match.

    T6 arg6

    The sixth parameter of the delegate match.

    T7 arg7

    The seventh parameter of the delegate match.

    T8 arg8

    The eighth parameter of the delegate match.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty System.Collections.Generic.IEnumerable<T>.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T1

    The type of the first parameter of the delegate match.

    T2

    The type of the second parameter of the delegate match.

    T3

    The type of the third parameter of the delegate match.

    T4

    The type of the fourth parameter of the delegate match.

    T5

    The type of the fifth parameter of the delegate match.

    T6

    The type of the sixth parameter of the delegate match.

    T7

    The type of the seventh parameter of the delegate match.

    T8

    The type of the eighth parameter of the delegate match.

    | Improve this Doc

    RandomOrDefault<TSource>(IEnumerable<TSource>)

    Returns a random element of a sequence of elements, or a default value if no element is found.

    Declaration
    public static TSource RandomOrDefault<TSource>(this IEnumerable<TSource> source)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The System.Collections.Generic.IEnumerable<T> to return a random element of.

    Returns
    Type Description
    TSource

    default(TSource) if source is empty; otherwise, a random element of source.

    Type Parameters
    Name Description
    TSource

    The type of the elements of source.

    | Improve this Doc

    RandomOrDefault<TSource>(IEnumerable<TSource>, Func<IEnumerable<TSource>, TSource>)

    Returns a random element of a sequence of elements, or a default value if no element is found.

    Declaration
    public static TSource RandomOrDefault<TSource>(this IEnumerable<TSource> source, Func<IEnumerable<TSource>, TSource> randomizer)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The System.Collections.Generic.IEnumerable<T> to return a random element of.

    System.Func<System.Collections.Generic.IEnumerable<TSource>, TSource> randomizer

    The function delegate that will select a random element of source.

    Returns
    Type Description
    TSource

    default(TSource) if source is empty; otherwise, a random element of source.

    Type Parameters
    Name Description
    TSource

    The type of the elements of source.

    | Improve this Doc

    SelectOne<TSource>(IEnumerable<TSource>, Func<IEnumerable<TSource>, TSource>)

    Retrieves the element that matches the conditions defined by the specified selector.

    Declaration
    public static TSource SelectOne<TSource>(this IEnumerable<TSource> source, Func<IEnumerable<TSource>, TSource> selector)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<System.Collections.Generic.IEnumerable<TSource>, TSource> selector

    The function delegate that defines the condition of the element to retrieve.

    Returns
    Type Description
    TSource

    A TSource element that matched the conditions defined by the specified selector.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    | Improve this Doc

    SelectOne<TSource, T>(IEnumerable<TSource>, Func<IEnumerable<TSource>, T, TSource>, T)

    Retrieves the element that matches the conditions defined by the specified selector.

    Declaration
    public static TSource SelectOne<TSource, T>(this IEnumerable<TSource> source, Func<IEnumerable<TSource>, T, TSource> selector, T arg)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<System.Collections.Generic.IEnumerable<TSource>, T, TSource> selector

    The function delegate that defines the condition of the element to retrieve.

    T arg

    The parameter of the function delegate selector.

    Returns
    Type Description
    TSource

    A TSource element that matched the conditions defined by the specified selector.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T

    The type of the parameter of the function delegate selector.

    | Improve this Doc

    SelectOne<TSource, T1, T2>(IEnumerable<TSource>, Func<IEnumerable<TSource>, T1, T2, TSource>, T1, T2)

    Retrieves the element that matches the conditions defined by the specified selector.

    Declaration
    public static TSource SelectOne<TSource, T1, T2>(this IEnumerable<TSource> source, Func<IEnumerable<TSource>, T1, T2, TSource> selector, T1 arg1, T2 arg2)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<System.Collections.Generic.IEnumerable<TSource>, T1, T2, TSource> selector

    The function delegate that defines the condition of the element to retrieve.

    T1 arg1

    The first parameter of the function delegate selector.

    T2 arg2

    The second parameter of the function delegate selector.

    Returns
    Type Description
    TSource

    A TSource element that matched the conditions defined by the specified selector.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T1

    The type of the first parameter of the function delegate selector.

    T2

    The type of the second parameter of the function delegate selector.

    | Improve this Doc

    SelectOne<TSource, T1, T2, T3>(IEnumerable<TSource>, Func<IEnumerable<TSource>, T1, T2, T3, TSource>, T1, T2, T3)

    Retrieves the element that matches the conditions defined by the specified selector.

    Declaration
    public static TSource SelectOne<TSource, T1, T2, T3>(this IEnumerable<TSource> source, Func<IEnumerable<TSource>, T1, T2, T3, TSource> selector, T1 arg1, T2 arg2, T3 arg3)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<System.Collections.Generic.IEnumerable<TSource>, T1, T2, T3, TSource> selector

    The function delegate that defines the condition of the element to retrieve.

    T1 arg1

    The first parameter of the function delegate selector.

    T2 arg2

    The second parameter of the function delegate selector.

    T3 arg3

    The third parameter of the function delegate selector.

    Returns
    Type Description
    TSource

    A TSource element that matched the conditions defined by the specified selector.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T1

    The type of the first parameter of the function delegate selector.

    T2

    The type of the second parameter of the function delegate selector.

    T3

    The type of the third parameter of the function delegate selector.

    | Improve this Doc

    SelectOne<TSource, T1, T2, T3, T4>(IEnumerable<TSource>, Func<IEnumerable<TSource>, T1, T2, T3, T4, TSource>, T1, T2, T3, T4)

    Retrieves the element that matches the conditions defined by the specified selector.

    Declaration
    public static TSource SelectOne<TSource, T1, T2, T3, T4>(this IEnumerable<TSource> source, Func<IEnumerable<TSource>, T1, T2, T3, T4, TSource> selector, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<System.Collections.Generic.IEnumerable<TSource>, T1, T2, T3, T4, TSource> selector

    The function delegate that defines the condition of the element to retrieve.

    T1 arg1

    The first parameter of the function delegate selector.

    T2 arg2

    The second parameter of the function delegate selector.

    T3 arg3

    The third parameter of the function delegate selector.

    T4 arg4

    The fourth parameter of the function delegate selector.

    Returns
    Type Description
    TSource

    A TSource element that matched the conditions defined by the specified selector.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T1

    The type of the first parameter of the function delegate selector.

    T2

    The type of the second parameter of the function delegate selector.

    T3

    The type of the third parameter of the function delegate selector.

    T4

    The type of the fourth parameter of the function delegate selector.

    | Improve this Doc

    SelectOne<TSource, T1, T2, T3, T4, T5>(IEnumerable<TSource>, Func<IEnumerable<TSource>, T1, T2, T3, T4, T5, TSource>, T1, T2, T3, T4, T5)

    Retrieves the element that matches the conditions defined by the specified selector.

    Declaration
    public static TSource SelectOne<TSource, T1, T2, T3, T4, T5>(IEnumerable<TSource> source, Func<IEnumerable<TSource>, T1, T2, T3, T4, T5, TSource> selector, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The sequence to search.

    System.Func<System.Collections.Generic.IEnumerable<TSource>, T1, T2, T3, T4, T5, TSource> selector

    The function delegate that defines the condition of the element to retrieve.

    T1 arg1

    The first parameter of the function delegate selector.

    T2 arg2

    The second parameter of the function delegate selector.

    T3 arg3

    The third parameter of the function delegate selector.

    T4 arg4

    The fourth parameter of the function delegate selector.

    T5 arg5

    The fifth parameter of the function delegate selector.

    Returns
    Type Description
    TSource

    A TSource element that matched the conditions defined by the specified selector.

    Type Parameters
    Name Description
    TSource

    The type of the elements of the sequence.

    T1

    The type of the first parameter of the function delegate selector.

    T2

    The type of the second parameter of the function delegate selector.

    T3

    The type of the third parameter of the function delegate selector.

    T4

    The type of the fourth parameter of the function delegate selector.

    T5

    The type of the fifth parameter of the function delegate selector.

    | Improve this Doc

    Yield<TSource>(TSource)

    Returns an System.Collections.Generic.IEnumerable<T> sequence with the specified source as the only element.

    Declaration
    public static IEnumerable<TSource> Yield<TSource>(this TSource source)
    Parameters
    Type Name Description
    TSource source

    The value to yield into an System.Collections.Generic.IEnumerable<T> sequence.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TSource>

    An System.Collections.Generic.IEnumerable<T> sequence with the specified source as the only element.

    Type Parameters
    Name Description
    TSource

    The type of source.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX