Table of Contents

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

source Result<TSource>

The synchronous source result.

collectionSelector Func<TSource, ValueTask<Result<TCollection>>>

An async function returning the intermediate result.

resultSelector Func<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

TSource

Type of the source value.

TCollection

Type of the intermediate collection value.

TResult

Type of the final projected value.