Method Execute
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
statusAsyncMapStatus<TInput, TResult>The pipeline that gets the value.
valueCell<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
TInputThe type of the input values.
TResultThe type of the results.
Exceptions
- ArgumentNullException
statusorvalueis null.