Show / Hide Table of Contents

    Class EnumerableConverter

    This utility class is designed to make System.Collections.Generic.IEnumerable<T> related conversions easier to work with.

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

    Methods

    | Improve this Doc

    AsArray<TSource>(TSource[])

    Converts the specified values to a one-dimensional array of the specified type, with zero-based indexing.

    Declaration
    public static TSource[] AsArray<TSource>(params TSource[] values)
    Parameters
    Type Name Description
    TSource[] values

    The values to create the System.Array from.

    Returns
    Type Description
    TSource[]

    A one-dimensional System.Array of the specified with a length equal to the values specified.

    Type Parameters
    Name Description
    TSource

    The type of the array of values.

    | Improve this Doc

    FromArray<TSource>(TSource[])

    Returns the input typed as System.Collections.Generic.IEnumerable<T>.

    Declaration
    public static IEnumerable<TSource> FromArray<TSource>(params TSource[] source)
    Parameters
    Type Name Description
    TSource[] source

    The array to type as System.Collections.Generic.IEnumerable<T>.

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

    The input source typed as System.Collections.Generic.IEnumerable<T>.

    Type Parameters
    Name Description
    TSource

    The type of the elements of source.

    | Improve this Doc

    FromDictionary<TKey, TValue>(IDictionary<TKey, TValue>)

    Converts the specified source to its System.Collections.Generic.KeyValuePair<TKey,TValue> equivalent sequence.

    Declaration
    public static IEnumerable<KeyValuePair<TKey, TValue>> FromDictionary<TKey, TValue>(IDictionary<TKey, TValue> source)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue> source

    An System.Collections.Generic.IDictionary<TKey, TValue> to convert into a System.Collections.Generic.KeyValuePair<TKey,TValue> equivalent sequence.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>

    A System.Collections.Generic.KeyValuePair<TKey,TValue> equivalent sequence of source.

    Type Parameters
    Name Description
    TKey

    The System.Type of the key in the resulting System.Collections.Generic.KeyValuePair<TKey,TValue>.

    TValue

    The System.Type of the value in the resulting System.Collections.Generic.KeyValuePair<TKey,TValue>.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source is null.

    | Improve this Doc

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

    Converts the specified source to a TResult representation using the specified converter.

    Declaration
    public static IEnumerable<TResult> Parse<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>(IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult> converter, 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 System.Collections.Generic.IEnumerable<T> source to parse and convert using the function delegate converter.

    System.Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult> converter

    The function delegate that converts TSource to a TResult representation once per iteration.

    T1 arg1

    The first parameter of the function delegate converter.

    T2 arg2

    The second parameter of the function delegate converter.

    T3 arg3

    The third parameter of the function delegate converter.

    T4 arg4

    The fourth parameter of the function delegate converter.

    T5 arg5

    The fifth parameter of the function delegate converter.

    T6 arg6

    The sixth parameter of the function delegate converter.

    T7 arg7

    The seventh parameter of the function delegate converter.

    T8 arg8

    The eighth parameter of the function delegate converter.

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

    An System.Collections.Generic.IEnumerable<T> that is equivalent to the TSource contained in source.

    Type Parameters
    Name Description
    TSource

    The type of the source to convert.

    T1

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

    T2

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

    T3

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

    T4

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

    T5

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

    T6

    The type of the sixth parameter of the function delegate converter.

    T7

    The type of the seventh parameter of the function delegate converter.

    T8

    The type of the eighth parameter of the function delegate converter.

    TResult

    The type of the converted result.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source is null - or - converter is null.

    | Improve this Doc

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

    Converts the specified source to a TResult representation using the specified converter.

    Declaration
    public static IEnumerable<TResult> Parse<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult> converter, 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 System.Collections.Generic.IEnumerable<T> source to parse and convert using the function delegate converter.

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

    The function delegate that converts TSource to a TResult representation once per iteration.

    T1 arg1

    The first parameter of the function delegate converter.

    T2 arg2

    The second parameter of the function delegate converter.

    T3 arg3

    The third parameter of the function delegate converter.

    T4 arg4

    The fourth parameter of the function delegate converter.

    T5 arg5

    The fifth parameter of the function delegate converter.

    T6 arg6

    The sixth parameter of the function delegate converter.

    T7 arg7

    The seventh parameter of the function delegate converter.

    T8 arg8

    The eighth parameter of the function delegate converter.

    T9 arg9

    The ninth parameter of the function delegate converter.

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

    An System.Collections.Generic.IEnumerable<T> that is equivalent to the TSource contained in source.

    Type Parameters
    Name Description
    TSource

    The type of the source to convert.

    T1

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

    T2

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

    T3

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

    T4

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

    T5

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

    T6

    The type of the sixth parameter of the function delegate converter.

    T7

    The type of the seventh parameter of the function delegate converter.

    T8

    The type of the eighth parameter of the function delegate converter.

    T9

    The type of the ninth parameter of the function delegate converter.

    TResult

    The type of the converted result.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source is null - or - converter is null.

    | Improve this Doc

    Parse<TSource, TResult>(IEnumerable<TSource>, Func<TSource, TResult>)

    Converts the specified source to a TResult representation using the specified converter.

    Declaration
    public static IEnumerable<TResult> Parse<TSource, TResult>(IEnumerable<TSource> source, Func<TSource, TResult> converter)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The System.Collections.Generic.IEnumerable<T> source to parse and convert using the function delegate converter.

    System.Func<TSource, TResult> converter

    The function delegate that converts TSource to a TResult representation once per iteration.

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

    An System.Collections.Generic.IEnumerable<T> that is equivalent to the TSource contained in source.

    Type Parameters
    Name Description
    TSource

    The type of the source to convert.

    TResult

    The type of the converted result.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source is null - or - converter is null.

    | Improve this Doc

    Parse<TSource, T, TResult>(IEnumerable<TSource>, Func<TSource, T, TResult>, T)

    Converts the specified source to a TResult representation using the specified converter.

    Declaration
    public static IEnumerable<TResult> Parse<TSource, T, TResult>(IEnumerable<TSource> source, Func<TSource, T, TResult> converter, T arg)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<TSource> source

    The System.Collections.Generic.IEnumerable<T> source to parse and convert using the function delegate converter.

    System.Func<TSource, T, TResult> converter

    The function delegate that converts TSource to a TResult representation once per iteration.

    T arg

    The parameter of the function delegate converter.

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

    An System.Collections.Generic.IEnumerable<T> that is equivalent to the TSource contained in source.

    Type Parameters
    Name Description
    TSource

    The type of the source to convert.

    T

    The type of the parameter of the function delegate converter.

    TResult

    The type of the converted result.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source is null - or - converter is null.

    | Improve this Doc

    Parse<TSource, T1, T2, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, TResult>, T1, T2)

    Converts the specified source to a TResult representation using the specified converter.

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

    The System.Collections.Generic.IEnumerable<T> source to parse and convert using the function delegate converter.

    System.Func<TSource, T1, T2, TResult> converter

    The function delegate that converts TSource to a TResult representation once per iteration.

    T1 arg1

    The first parameter of the function delegate converter.

    T2 arg2

    The second parameter of the function delegate converter.

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

    An System.Collections.Generic.IEnumerable<T> that is equivalent to the TSource contained in source.

    Type Parameters
    Name Description
    TSource

    The type of the source to convert.

    T1

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

    T2

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

    TResult

    The type of the converted result.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source is null - or - converter is null.

    | Improve this Doc

    Parse<TSource, T1, T2, T3, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, TResult>, T1, T2, T3)

    Converts the specified source to a TResult representation using the specified converter.

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

    The System.Collections.Generic.IEnumerable<T> source to parse and convert using the function delegate converter.

    System.Func<TSource, T1, T2, T3, TResult> converter

    The function delegate that converts TSource to a TResult representation once per iteration.

    T1 arg1

    The first parameter of the function delegate converter.

    T2 arg2

    The second parameter of the function delegate converter.

    T3 arg3

    The third parameter of the function delegate converter.

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

    An System.Collections.Generic.IEnumerable<T> that is equivalent to the TSource contained in source.

    Type Parameters
    Name Description
    TSource

    The type of the source to convert.

    T1

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

    T2

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

    T3

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

    TResult

    The type of the converted result.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source is null - or - converter is null.

    | Improve this Doc

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

    Converts the specified source to a TResult representation using the specified converter.

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

    The System.Collections.Generic.IEnumerable<T> source to parse and convert using the function delegate converter.

    System.Func<TSource, T1, T2, T3, T4, TResult> converter

    The function delegate that converts TSource to a TResult representation once per iteration.

    T1 arg1

    The first parameter of the function delegate converter.

    T2 arg2

    The second parameter of the function delegate converter.

    T3 arg3

    The third parameter of the function delegate converter.

    T4 arg4

    The fourth parameter of the function delegate converter.

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

    An System.Collections.Generic.IEnumerable<T> that is equivalent to the TSource contained in source.

    Type Parameters
    Name Description
    TSource

    The type of the source to convert.

    T1

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

    T2

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

    T3

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

    T4

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

    TResult

    The type of the converted result.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source is null - or - converter is null.

    | Improve this Doc

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

    Converts the specified source to a TResult representation using the specified converter.

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

    The System.Collections.Generic.IEnumerable<T> source to parse and convert using the function delegate converter.

    System.Func<TSource, T1, T2, T3, T4, T5, TResult> converter

    The function delegate that converts TSource to a TResult representation once per iteration.

    T1 arg1

    The first parameter of the function delegate converter.

    T2 arg2

    The second parameter of the function delegate converter.

    T3 arg3

    The third parameter of the function delegate converter.

    T4 arg4

    The fourth parameter of the function delegate converter.

    T5 arg5

    The fifth parameter of the function delegate converter.

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

    An System.Collections.Generic.IEnumerable<T> that is equivalent to the TSource contained in source.

    Type Parameters
    Name Description
    TSource

    The type of the source to convert.

    T1

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

    T2

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

    T3

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

    T4

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

    T5

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

    TResult

    The type of the converted result.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source is null - or - converter is null.

    | Improve this Doc

    Parse<TSource, T1, T2, T3, T4, T5, T6, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, TResult>, T1, T2, T3, T4, T5, T6)

    Converts the specified source to a TResult representation using the specified converter.

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

    The System.Collections.Generic.IEnumerable<T> source to parse and convert using the function delegate converter.

    System.Func<TSource, T1, T2, T3, T4, T5, T6, TResult> converter

    The function delegate that converts TSource to a TResult representation once per iteration.

    T1 arg1

    The first parameter of the function delegate converter.

    T2 arg2

    The second parameter of the function delegate converter.

    T3 arg3

    The third parameter of the function delegate converter.

    T4 arg4

    The fourth parameter of the function delegate converter.

    T5 arg5

    The fifth parameter of the function delegate converter.

    T6 arg6

    The sixth parameter of the function delegate converter.

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

    An System.Collections.Generic.IEnumerable<T> that is equivalent to the TSource contained in source.

    Type Parameters
    Name Description
    TSource

    The type of the source to convert.

    T1

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

    T2

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

    T3

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

    T4

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

    T5

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

    T6

    The type of the sixth parameter of the function delegate converter.

    TResult

    The type of the converted result.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source is null - or - converter is null.

    | Improve this Doc

    Parse<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>, T1, T2, T3, T4, T5, T6, T7)

    Converts the specified source to a TResult representation using the specified converter.

    Declaration
    public static IEnumerable<TResult> Parse<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>(IEnumerable<TSource> source, Func<TSource, T1, T2, T3, T4, T5, T6, T7, TResult> converter, 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 System.Collections.Generic.IEnumerable<T> source to parse and convert using the function delegate converter.

    System.Func<TSource, T1, T2, T3, T4, T5, T6, T7, TResult> converter

    The function delegate that converts TSource to a TResult representation once per iteration.

    T1 arg1

    The first parameter of the function delegate converter.

    T2 arg2

    The second parameter of the function delegate converter.

    T3 arg3

    The third parameter of the function delegate converter.

    T4 arg4

    The fourth parameter of the function delegate converter.

    T5 arg5

    The fifth parameter of the function delegate converter.

    T6 arg6

    The sixth parameter of the function delegate converter.

    T7 arg7

    The seventh parameter of the function delegate converter.

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

    An System.Collections.Generic.IEnumerable<T> that is equivalent to the TSource contained in source.

    Type Parameters
    Name Description
    TSource

    The type of the source to convert.

    T1

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

    T2

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

    T3

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

    T4

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

    T5

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

    T6

    The type of the sixth parameter of the function delegate converter.

    T7

    The type of the seventh parameter of the function delegate converter.

    TResult

    The type of the converted result.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source is null - or - converter is null.

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