SuperLinq SuperLinq
SuperLinq SuperLinq
DocFX + Singulink = ♥

Search Results for

    Method EndsWith

    EndsWith<T>(IAsyncEnumerable<T>, IEnumerable<T>, CancellationToken)

    Determines whether the end of the first sequence is equivalent to the second sequence, using the default equality comparer.

    Declaration
    public static ValueTask<bool> EndsWith<T>(this IAsyncEnumerable<T> first, IEnumerable<T> second, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IAsyncEnumerable<T> first

    The sequence to check.

    IEnumerable<T> second

    The sequence to compare to.

    CancellationToken cancellationToken

    The optional cancellation token to be used for cancelling the sequence at any time.

    Returns
    Type Description
    ValueTask<bool>

    true if first ends with elements equivalent to second.

    Type Parameters
    Name Description
    T

    Type of elements.

    Remarks

    This is the IAsyncEnumerable<T> equivalent of EndsWith(string) and it calls Equals(T, T) using Default on pairs of elements at the same index.

    EndsWith<T>(IAsyncEnumerable<T>, IAsyncEnumerable<T>, CancellationToken)

    Determines whether the end of the first sequence is equivalent to the second sequence, using the default equality comparer.

    Declaration
    public static ValueTask<bool> EndsWith<T>(this IAsyncEnumerable<T> first, IAsyncEnumerable<T> second, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IAsyncEnumerable<T> first

    The sequence to check.

    IAsyncEnumerable<T> second

    The sequence to compare to.

    CancellationToken cancellationToken

    The optional cancellation token to be used for cancelling the sequence at any time.

    Returns
    Type Description
    ValueTask<bool>

    true if first ends with elements equivalent to second.

    Type Parameters
    Name Description
    T

    Type of elements.

    Remarks

    This is the IAsyncEnumerable<T> equivalent of EndsWith(string) and it calls Equals(T, T) using Default on pairs of elements at the same index.

    EndsWith<T>(IAsyncEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>?, CancellationToken)

    Determines whether the end of the first sequence is equivalent to the second sequence, using the specified element equality comparer.

    Declaration
    public static ValueTask<bool> EndsWith<T>(this IAsyncEnumerable<T> first, IEnumerable<T> second, IEqualityComparer<T>? comparer, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IAsyncEnumerable<T> first

    The sequence to check.

    IEnumerable<T> second

    The sequence to compare to.

    IEqualityComparer<T> comparer

    Equality comparer to use.

    CancellationToken cancellationToken

    The optional cancellation token to be used for cancelling the sequence at any time.

    Returns
    Type Description
    ValueTask<bool>

    true if first ends with elements equivalent to second.

    Type Parameters
    Name Description
    T

    Type of elements.

    Remarks

    This is the IAsyncEnumerable<T> equivalent of EndsWith(string) and it calls Equals(T, T) on pairs of elements at the same index.

    EndsWith<T>(IAsyncEnumerable<T>, IAsyncEnumerable<T>, IEqualityComparer<T>?, CancellationToken)

    Determines whether the end of the first sequence is equivalent to the second sequence, using the specified element equality comparer.

    Declaration
    public static ValueTask<bool> EndsWith<T>(this IAsyncEnumerable<T> first, IAsyncEnumerable<T> second, IEqualityComparer<T>? comparer, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IAsyncEnumerable<T> first

    The sequence to check.

    IAsyncEnumerable<T> second

    The sequence to compare to.

    IEqualityComparer<T> comparer

    Equality comparer to use.

    CancellationToken cancellationToken

    The optional cancellation token to be used for cancelling the sequence at any time.

    Returns
    Type Description
    ValueTask<bool>

    true if first ends with elements equivalent to second.

    Type Parameters
    Name Description
    T

    Type of elements.

    Remarks

    This is the IAsyncEnumerable<T> equivalent of EndsWith(string) and it calls Equals(T, T) on pairs of elements at the same index.

    © SuperLinq Authors. All rights reserved.