Table of Contents

Class ResultFactory<TResult>

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

Makes the answer of a MapAsyncOperation<TInput, TResult>. The pipeline gives one to each call of the operation. It holds no state, and a caller cannot make one.

[PublicAPI]
public sealed class ResultFactory<TResult>

Type Parameters

TResult

The type that the pipeline publishes.

Inheritance
ResultFactory<TResult>
Inherited Members
Extension Methods

Methods

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.

FromValue(TResult)

Carries a result that the operation has. Use this one when the operation makes no part of a SodaFlow graph.