Table of Contents

Method Construct

Namespace
SodaFlow.Async
Assembly
SodaFlow.Core.Async.dll

Construct(Func<TResult>)

Carries a function that makes the result. The pipeline calls it one time, in the transaction that sends the result, which is what a result with a cell or a stream in it must have. Keep the function short, because it holds that transaction while it runs. The pipeline calls it only for an item that it publishes: the strategy decides that first, and this function runs after that decision. Thus, an item that a cancellation stopped, or that a strategy refused, makes no result at all.

public MapAsyncResult<TResult> Construct(Func<TResult> makeResult)

Parameters

makeResult Func<TResult>

Makes the value to publish.

Returns

MapAsyncResult<TResult>

The answer to return from the operation.