Table of Contents

Class MaybeLinqExtensionsTaskLeftAsync

Namespace
Trellis
Assembly
Trellis.Core.dll

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

public static class MaybeLinqExtensionsTaskLeftAsync
Inheritance
MaybeLinqExtensionsTaskLeftAsync
Inherited Members

Methods

SelectMany<TSource, TCollection, TResult>(Task<Maybe<TSource>>, Func<TSource, Maybe<TCollection>>, Func<TSource, TCollection, TResult>)

Projects an awaited Maybe<T> through a synchronous collection selector (LINQ SelectMany: async source / sync continuation).

public static Task<Maybe<TResult>> SelectMany<TSource, TCollection, TResult>(this Task<Maybe<TSource>> source, Func<TSource, Maybe<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector) where TSource : notnull where TCollection : notnull where TResult : notnull

Parameters

source Task<Maybe<TSource>>

The asynchronous source Maybe.

collectionSelector Func<TSource, Maybe<TCollection>>

A synchronous function returning the intermediate Maybe.

resultSelector Func<TSource, TCollection, TResult>

A synchronous function combining the source and intermediate values.

Returns

Task<Maybe<TResult>>

A task producing the combined Maybe, or None if any step has no value.

Type Parameters

TSource

Type of the source value.

TCollection

Type of the intermediate collection value.

TResult

Type of the final projected value.