Class MaybeLinqExtensionsValueTaskRightAsync
- Namespace
- Trellis
- Assembly
- Trellis.Core.dll
Async LINQ SelectMany overload where the source is a synchronous Maybe<T>
and the collection selector returns a ValueTask<TResult> of Maybe<T>.
public static class MaybeLinqExtensionsValueTaskRightAsync
- Inheritance
-
MaybeLinqExtensionsValueTaskRightAsync
- Inherited Members
Methods
SelectMany<TSource, TCollection, TResult>(Maybe<TSource>, Func<TSource, ValueTask<Maybe<TCollection>>>, Func<TSource, TCollection, TResult>)
Projects a synchronous Maybe<T> through an async collection selector
(LINQ SelectMany: sync source / async continuation, ValueTask variant).
public static ValueTask<Maybe<TResult>> SelectMany<TSource, TCollection, TResult>(this Maybe<TSource> source, Func<TSource, ValueTask<Maybe<TCollection>>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector) where TSource : notnull where TCollection : notnull where TResult : notnull
Parameters
sourceMaybe<TSource>The synchronous source Maybe.
collectionSelectorFunc<TSource, ValueTask<Maybe<TCollection>>>An async function returning the intermediate Maybe.
resultSelectorFunc<TSource, TCollection, TResult>A synchronous function combining the source and intermediate values.
Returns
- ValueTask<Maybe<TResult>>
A value task producing the combined Maybe, or
Noneif any step has no value.
Type Parameters
TSourceType of the source value.
TCollectionType of the intermediate collection value.
TResultType of the final projected value.