ColdTaskBuilderBase Type
Contains the coldTask computation expression builder.
Constructors
Constructor | Description |
|
|
Instance members
Instance member | Description |
Full Usage:
this.Combine
Parameters:
ColdTaskCode<'TOverall, unit>
-
The first part of the sequenced computation.
task2 : ColdTaskCode<'TOverall, 'T>
-
The second part of the sequenced computation.
Returns: ColdTaskCode<'TOverall, 'T>
An ColdTask that runs both of the computations sequentially.
Modifiers: inline Type parameters: 'TOverall, 'T |
The existence of this method permits the use of expression sequencing in the coldTask { ... } computation expression syntax.
|
Full Usage:
this.Delay
Parameters:
unit -> ColdTaskCode<'TOverall, 'T>
-
The function to run
Returns: ColdTaskCode<'TOverall, 'T>
A coldTask that runs generator
Modifiers: inline Type parameters: 'TOverall, 'T |
|
Full Usage:
this.For
Parameters:
'T seq
-
The sequence to enumerate.
body : 'T -> ColdTaskCode<'TOverall, unit>
-
A function to take an item from the sequence and create
an ColdTask. Can be seen as the body of the for expression.
Returns: ColdTaskCode<'TOverall, unit>
An ColdTask that will enumerate the sequence and run body
for each element.
Modifiers: inline Type parameters: 'T, 'TOverall |
The existence of this method permits the use of for in the coldTask { ... } computation expression syntax.
|
Full Usage:
this.Return
Parameters:
'T
-
The value to return from the computation.
Returns: ColdTaskCode<'T, 'T>
An ColdTask that returns value when executed.
Modifiers: inline Type parameters: 'T |
The existence of this method permits the use of return in the coldTask { ... } computation expression syntax.
|
Full Usage:
this.TryFinally
Parameters:
ColdTaskCode<'TOverall, 'T>
compensation : unit -> unit
-
The action to be run after computation completes or raises an
exception (including cancellation).
Returns: ColdTaskCode<'TOverall, 'T>
An ColdTask that executes computation and compensation afterwards or
when an exception is raised.
Modifiers: inline Type parameters: 'TOverall, 'T |
Creates an ColdTask 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 coldTask { ... } computation expression syntax.
|
Full Usage:
this.TryWith
Parameters:
ColdTaskCode<'TOverall, 'T>
catch : exn -> ColdTaskCode<'TOverall, 'T>
Returns: ColdTaskCode<'TOverall, 'T>
An ColdTask that executes computation and calls catchHandler if an
exception is thrown.
Modifiers: inline Type parameters: 'TOverall, 'T |
The existence of this method permits the use of try/with in the coldTask { ... } computation expression syntax.
|
Full Usage:
this.Using
Parameters:
'a
-
The resource to be used and disposed.
binder : 'a -> ColdTaskCode<'TOverall, 'T>
-
The function that takes the resource and returns an asynchronous
computation.
Returns: ColdTaskCode<'TOverall, 'T>
An ColdTask that binds and eventually disposes resource.
Modifiers: inline Type parameters: 'a, 'TOverall, 'T |
The existence of this method permits the use of use and use! in the coldTask { ... } computation expression syntax.
|
Full Usage:
this.While
Parameters:
unit -> bool
-
The function to determine when to stop executing computation.
body : ColdTaskCode<'TOverall, unit>
Returns: ColdTaskCode<'TOverall, unit>
An ColdTask that behaves similarly to a while loop when run.
Modifiers: inline Type parameters: 'TOverall |
The existence of this method permits the use of while in the coldTask { ... } computation expression syntax.
|
Full Usage:
this.Zero
Returns: ColdTaskCode<'TOverall, unit>
An ColdTask that returns ().
Modifiers: inline Type parameters: 'TOverall |
The existence of this method permits the use of empty else branches in the coldTask { ... } computation expression syntax.
|