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