SuperLinq SuperLinq
SuperLinq SuperLinq
DocFX + Singulink = ♥

Search Results for

    Method ZipShortest

    ZipShortest<TFirst, TSecond, TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, Func<TFirst, TSecond, TResult>)

    Returns a projection of tuples, where each tuple contains the N-th element from each of the argument sequences. The resulting sequence is as short as the shortest input sequence.

    Declaration
    public static IAsyncEnumerable<TResult> ZipShortest<TFirst, TSecond, TResult>(this IAsyncEnumerable<TFirst> first, IAsyncEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector)
    Parameters
    Type Name Description
    IAsyncEnumerable<TFirst> first

    The first sequence of elements.

    IAsyncEnumerable<TSecond> second

    The second sequence of elements.

    Func<TFirst, TSecond, TResult> resultSelector

    A projection function that combines elements from all of the sequences.

    Returns
    Type Description
    IAsyncEnumerable<TResult>

    A sequence of elements returned by resultSelector.

    Type Parameters
    Name Description
    TFirst

    The type of the elements of first.

    TSecond

    The type of the elements of second.

    TResult

    The type of the elements of the result sequence.

    Remarks

    This method uses deferred execution and streams its results.

    Exceptions
    Type Condition
    ArgumentNullException

    resultSelector or any of the input sequences is null.

    ZipShortest<TFirst, TSecond>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>)

    Returns a projection of tuples, where each tuple contains the N-th element from each of the argument sequences. The resulting sequence will always be as long as the longest of input sequences where the default value of each of the shorter sequence element types is used for padding.

    Declaration
    public static IAsyncEnumerable<(TFirst, TSecond)> ZipShortest<TFirst, TSecond>(this IAsyncEnumerable<TFirst> first, IAsyncEnumerable<TSecond> second)
    Parameters
    Type Name Description
    IAsyncEnumerable<TFirst> first

    The first sequence of elements.

    IAsyncEnumerable<TSecond> second

    The second sequence of elements.

    Returns
    Type Description
    IAsyncEnumerable<(TFirst, TSecond)>

    A sequence of (T1, T2) containing corresponding elements from each of the sequences.

    Type Parameters
    Name Description
    TFirst

    The type of the elements of first.

    TSecond

    The type of the elements of second.

    Remarks

    This method uses deferred execution and streams its results.

    Exceptions
    Type Condition
    ArgumentNullException

    Any of the input sequences is null.

    ZipShortest<TFirst, TSecond, TThird, TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, IAsyncEnumerable<TThird>, Func<TFirst, TSecond, TThird, TResult>)

    Returns a projection of tuples, where each tuple contains the N-th element from each of the argument sequences. The resulting sequence is as short as the shortest input sequence.

    Declaration
    public static IAsyncEnumerable<TResult> ZipShortest<TFirst, TSecond, TThird, TResult>(this IAsyncEnumerable<TFirst> first, IAsyncEnumerable<TSecond> second, IAsyncEnumerable<TThird> third, Func<TFirst, TSecond, TThird, TResult> resultSelector)
    Parameters
    Type Name Description
    IAsyncEnumerable<TFirst> first

    The first sequence of elements.

    IAsyncEnumerable<TSecond> second

    The second sequence of elements.

    IAsyncEnumerable<TThird> third

    The third sequence of elements.

    Func<TFirst, TSecond, TThird, TResult> resultSelector

    A projection function that combines elements from all of the sequences.

    Returns
    Type Description
    IAsyncEnumerable<TResult>

    A sequence of elements returned by resultSelector.

    Type Parameters
    Name Description
    TFirst

    The type of the elements of first.

    TSecond

    The type of the elements of second.

    TThird

    The type of the elements of third.

    TResult

    The type of the elements of the result sequence.

    Remarks

    This method uses deferred execution and streams its results.

    Exceptions
    Type Condition
    ArgumentNullException

    resultSelector or any of the input sequences is null.

    ZipShortest<TFirst, TSecond, TThird>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, IAsyncEnumerable<TThird>)

    Returns a projection of tuples, where each tuple contains the N-th element from each of the argument sequences. The resulting sequence will always be as long as the longest of input sequences where the default value of each of the shorter sequence element types is used for padding.

    Declaration
    public static IAsyncEnumerable<(TFirst, TSecond, TThird)> ZipShortest<TFirst, TSecond, TThird>(this IAsyncEnumerable<TFirst> first, IAsyncEnumerable<TSecond> second, IAsyncEnumerable<TThird> third)
    Parameters
    Type Name Description
    IAsyncEnumerable<TFirst> first

    The first sequence of elements.

    IAsyncEnumerable<TSecond> second

    The second sequence of elements.

    IAsyncEnumerable<TThird> third

    The third sequence of elements.

    Returns
    Type Description
    IAsyncEnumerable<(TFirst, TSecond, TThird)>

    A sequence of (T1, T2, T3) containing corresponding elements from each of the sequences.

    Type Parameters
    Name Description
    TFirst

    The type of the elements of first.

    TSecond

    The type of the elements of second.

    TThird

    The type of the elements of third.

    Remarks

    This method uses deferred execution and streams its results.

    Exceptions
    Type Condition
    ArgumentNullException

    Any of the input sequences is null.

    ZipShortest<TFirst, TSecond, TThird, TFourth, TResult>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, IAsyncEnumerable<TThird>, IAsyncEnumerable<TFourth>, Func<TFirst, TSecond, TThird, TFourth, TResult>)

    Returns a projection of tuples, where each tuple contains the N-th element from each of the argument sequences. The resulting sequence is as short as the shortest input sequence.

    Declaration
    public static IAsyncEnumerable<TResult> ZipShortest<TFirst, TSecond, TThird, TFourth, TResult>(this IAsyncEnumerable<TFirst> first, IAsyncEnumerable<TSecond> second, IAsyncEnumerable<TThird> third, IAsyncEnumerable<TFourth> fourth, Func<TFirst, TSecond, TThird, TFourth, TResult> resultSelector)
    Parameters
    Type Name Description
    IAsyncEnumerable<TFirst> first

    The first sequence of elements.

    IAsyncEnumerable<TSecond> second

    The second sequence of elements.

    IAsyncEnumerable<TThird> third

    The third sequence of elements.

    IAsyncEnumerable<TFourth> fourth

    The fourth sequence of elements.

    Func<TFirst, TSecond, TThird, TFourth, TResult> resultSelector

    A projection function that combines elements from all of the sequences.

    Returns
    Type Description
    IAsyncEnumerable<TResult>

    A sequence of elements returned by resultSelector.

    Type Parameters
    Name Description
    TFirst

    The type of the elements of first.

    TSecond

    The type of the elements of second.

    TThird

    The type of the elements of third.

    TFourth

    The type of the elements of fourth.

    TResult

    The type of the elements of the result sequence.

    Remarks

    This method uses deferred execution and streams its results.

    Exceptions
    Type Condition
    ArgumentNullException

    resultSelector or any of the input sequences is null.

    ZipShortest<TFirst, TSecond, TThird, TFourth>(IAsyncEnumerable<TFirst>, IAsyncEnumerable<TSecond>, IAsyncEnumerable<TThird>, IAsyncEnumerable<TFourth>)

    Returns a projection of tuples, where each tuple contains the N-th element from each of the argument sequences. The resulting sequence will always be as long as the longest of input sequences where the default value of each of the shorter sequence element types is used for padding.

    Declaration
    public static IAsyncEnumerable<(TFirst, TSecond, TThird, TFourth)> ZipShortest<TFirst, TSecond, TThird, TFourth>(this IAsyncEnumerable<TFirst> first, IAsyncEnumerable<TSecond> second, IAsyncEnumerable<TThird> third, IAsyncEnumerable<TFourth> fourth)
    Parameters
    Type Name Description
    IAsyncEnumerable<TFirst> first

    The first sequence of elements.

    IAsyncEnumerable<TSecond> second

    The second sequence of elements.

    IAsyncEnumerable<TThird> third

    The third sequence of elements.

    IAsyncEnumerable<TFourth> fourth

    The fourth sequence of elements.

    Returns
    Type Description
    IAsyncEnumerable<(TFirst, TSecond, TThird, TFourth)>

    A sequence of (T1, T2, T3, T4) containing corresponding elements from each of the sequences.

    Type Parameters
    Name Description
    TFirst

    The type of the elements of first.

    TSecond

    The type of the elements of second.

    TThird

    The type of the elements of third.

    TFourth

    The type of the elements of fourth.

    Remarks

    This method uses deferred execution and streams its results.

    Exceptions
    Type Condition
    ArgumentNullException

    Any of the input sequences is null.

    © SuperLinq Authors. All rights reserved.