Table of Contents

Method Execute

Namespace
SodaFlow.Async
Assembly
SodaFlow.Async.dll

Execute<TInput, TResult>(AsyncMapStatus<TInput, TResult>, Cell<Maybe<TInput>>)

Puts the value of a cell into the pipeline only where the cell holds Some, and answers with the Task of that value alone. This method reads the cell in the transaction that puts the value in, as Execute(Cell<TInput>) does.

Where the cell holds Some at that instant, the pipeline admits its value. The Task then gives Some with the result, and it obeys the rules of Execute(TInput) for each other condition. Read the remarks of that method.

Where the cell holds None at that instant, the pipeline admits nothing and the operation does not run. The Task gives None. This method does not wait for the cell to hold Some. A cancellation never gives None, thus None always tells that the cell held None.

public static Task<Maybe<TResult>> Execute<TInput, TResult>(this AsyncMapStatus<TInput, TResult> status, Cell<Maybe<TInput>> value)

Parameters

status AsyncMapStatus<TInput, TResult>

The pipeline that gets the value.

value Cell<Maybe<TInput>>

The cell to read.

Returns

Task<Maybe<TResult>>

The Task of the value that the cell gives, or a Task that gives None where the cell holds None.

Type Parameters

TInput

The type of the input values.

TResult

The type of the results.

Exceptions

ArgumentNullException

status or value is null.