CancellableTaskBuilderBase Type
Contains methods to build TaskLikes using the F# computation expression syntax
Constructors
Constructor | Description |
|
|
Instance members
Instance member | Description |
Full Usage:
this.Combine
Parameters:
CancellableTaskBaseCode<'TOverall, unit, 'Builder>
-
The first part of the sequenced computation.
task2 : CancellableTaskBaseCode<'TOverall, 'T, 'Builder>
-
The second part of the sequenced computation.
Returns: CancellableTaskBaseCode<'TOverall, 'T, 'Builder>
A CancellableTasks that runs both of the computations sequentially.
Modifiers: inline Type parameters: 'TOverall, 'Builder, 'T |
The existence of this method permits the use of expression sequencing in the cancellableTasks { ... } computation expression syntax.
|
Full Usage:
this.Delay
Parameters:
unit -> CancellableTaskBaseCode<'TOverall, 'T, 'Builder>
-
The function to run
Returns: CancellableTaskBaseCode<'TOverall, 'T, 'Builder>
A CancellableTasks that runs generator
Modifiers: inline Type parameters: 'TOverall, 'T, 'Builder |
|
Full Usage:
this.For
Parameters:
'T seq
-
The sequence to enumerate.
body : 'T -> CancellableTaskBaseCode<'TOverall, unit, 'Builder>
-
A function to take an item from the sequence and create
A CancellableTask. Can be seen as the body of the for expression.
Returns: CancellableTaskBaseCode<'TOverall, unit, 'Builder>
A CancellableTask that will enumerate the sequence and run body
for each element.
Modifiers: inline Type parameters: 'T, 'TOverall, 'Builder |
A cancellation check is performed on each iteration of the loop. The existence of this method permits the use of for in the cancellableTask { ... } computation expression syntax.
|
Full Usage:
this.Return
Parameters:
'T
-
The value to return from the computation.
Returns: CancellableTaskBaseCode<'T, 'T, 'Builder>
A cancellableTasks that returns value when executed.
Modifiers: inline Type parameters: 'T, 'Builder |
A cancellation check is performed when the computation is executed. The existence of this method permits the use of return in the cancellableTasks { ... } computation expression syntax.
|
Full Usage:
this.TryFinally
Parameters:
CancellableTaskBaseCode<'TOverall, 'T, 'Builder>
-
The input computation.
compensation : unit -> unit
-
The action to be run after computation completes or raises an
exception (including cancellation).
Returns: CancellableTaskBaseCode<'TOverall, 'T, 'Builder>
A CancellableTasks that executes computation and compensation afterwards or
when an exception is raised.
Modifiers: inline Type parameters: 'TOverall, 'T, 'Builder |
Creates A CancellableTasks that runs computation. The action compensation is executed after computation completes, whether computation exits normally or by an exception. If compensation raises an exception itself the original exception is discarded and the new exception becomes the overall result of the computation. The existence of this method permits the use of try/finally in the cancellableTasks { ... } computation expression syntax.
|
Full Usage:
this.TryWith
Parameters:
CancellableTaskBaseCode<'TOverall, 'T, 'Builder>
-
The input computation.
catchHandler : exn -> CancellableTaskBaseCode<'TOverall, 'T, 'Builder>
-
The function to run when computation throws an exception.
Returns: CancellableTaskBaseCode<'TOverall, 'T, 'Builder>
A CancellableTasks that executes computation and calls catchHandler if an
exception is thrown.
Modifiers: inline Type parameters: 'TOverall, 'T, 'Builder |
The existence of this method permits the use of try/with in the cancellableTasks { ... } computation expression syntax.
|
Full Usage:
this.While
Parameters:
unit -> bool
-
The function to determine when to stop executing computation.
computation : CancellableTaskBaseCode<'TOverall, unit, 'Builder>
-
The function to be executed. Equivalent to the body
of a while expression.
Returns: CancellableTaskBaseCode<'TOverall, unit, 'Builder>
A CancellableTasks that behaves similarly to a while loop when run.
Modifiers: inline Type parameters: 'TOverall, 'Builder |
The existence of this method permits the use of while in the cancellableTasks { ... } computation expression syntax.
|
Full Usage:
this.Zero
Returns: CancellableTaskBaseCode<'TOverall, unit, 'Builder>
A CancellableTasks that returns ().
Modifiers: inline Type parameters: 'TOverall, 'Builder |
The existence of this method permits the use of empty else branches in the cancellableTasks { ... } computation expression syntax.
|