Table of Contents

Class ResultLinqExtensionsValueTaskLeftAsync

Namespace
Trellis
Assembly
Trellis.Core.dll

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

public static class ResultLinqExtensionsValueTaskLeftAsync
Inheritance
ResultLinqExtensionsValueTaskLeftAsync
Inherited Members

Methods

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

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

public static ValueTask<Result<TResult>> SelectMany<TSource, TCollection, TResult>(this ValueTask<Result<TSource>> source, Func<TSource, Result<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector)

Parameters

source ValueTask<Result<TSource>>

The asynchronous source result.

collectionSelector Func<TSource, Result<TCollection>>

A synchronous 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.