Table of Contents

Class MaybeLinqExtensionsValueTaskLeftAsync

Namespace
Trellis
Assembly
Trellis.Core.dll

Async LINQ SelectMany overload where the source is a ValueTask<TResult> of Maybe<T> and the collection selector is synchronous.

public static class MaybeLinqExtensionsValueTaskLeftAsync
Inheritance
MaybeLinqExtensionsValueTaskLeftAsync
Inherited Members

Methods

SelectMany<TSource, TCollection, TResult>(ValueTask<Maybe<TSource>>, Func<TSource, Maybe<TCollection>>, Func<TSource, TCollection, TResult>)

Projects an awaited Maybe<T> through a synchronous collection selector (LINQ SelectMany: async source / sync continuation, ValueTask variant).

public static ValueTask<Maybe<TResult>> SelectMany<TSource, TCollection, TResult>(this ValueTask<Maybe<TSource>> source, Func<TSource, Maybe<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector) where TSource : notnull where TCollection : notnull where TResult : notnull

Parameters

source ValueTask<Maybe<TSource>>

The asynchronous source Maybe.

collectionSelector Func<TSource, Maybe<TCollection>>

A synchronous function returning the intermediate Maybe.

resultSelector Func<TSource, TCollection, TResult>

A synchronous function combining the source and intermediate values.

Returns

ValueTask<Maybe<TResult>>

A value task producing the combined Maybe, or None if any step has no value.

Type Parameters

TSource

Type of the source value.

TCollection

Type of the intermediate collection value.

TResult

Type of the final projected value.