Table of Contents

Class ResultLinqExtensionsTaskLeftAsync

Namespace
Trellis
Assembly
Trellis.Core.dll

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

public static class ResultLinqExtensionsTaskLeftAsync
Inheritance
ResultLinqExtensionsTaskLeftAsync
Inherited Members

Methods

SelectMany<TSource, TCollection, TResult>(Task<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).

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

Parameters

source Task<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

Task<Result<TResult>>

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