WorkflowResultBuilderType

PackageFCQRS.Workflows
Builds a workflow that gives a `Result`: `workflowResult { let! x = activity ... }`. `let!` on a step that gives `Result<'T, 'E>` continues with the `Ok` value and ends the block with the `Error`. `let!` on any other step, such as `now` or `sleep`, continues with its value. Every step that ran before an `Error` stays stored. An `Error` is a value, so `try ... with` does not catch it, and an exception does not become an `Error`.

Specification

Kind
Type
Members
16
Examples
0
``.ctor``Signature
WorkflowResultBuilder()
BindSignature
this.Bind
CombineSignature
this.Combine
DelaySignature
this.Delay
ForSignature
this.For

Summary

NameSignatureSynopsis
``.ctor``WorkflowResultBuilder()No description available.
Bindthis.BindNo description available.
Combinethis.CombineNo description available.
Delaythis.DelayNo description available.
Forthis.ForNo description available.
MergeSourcesthis.MergeSources`let!
Returnthis.ReturnNo description available.
ReturnFromthis.ReturnFromNo description available.
Sourcethis.SourceNo description available.
Sourcethis.SourceNo description available.
Sourcethis.SourceNo description available.
TryFinallythis.TryFinallyNo description available.
TryWiththis.TryWithNo description available.
Usingthis.UsingNo description available.
Whilethis.WhileStops at the first iteration that gives an `Error`, and gives that `Error`.
Zerothis.ZeroNo description available.

``.ctor``

WorkflowResultBuilder()
Member

Returns

WorkflowResultBuilder

Bind

this.Bind
Member

Parameters

NameTypeDescription
workflowWorkflow<Result<'A, 'E>>
next'A -> Workflow<Result<'B, 'E>>

Returns

Workflow<Result<'B, 'E>>

Combine

this.Combine
Member

Parameters

NameTypeDescription
firstWorkflow<Result<unit, 'E>>
secondWorkflow<Result<'T, 'E>>

Returns

Workflow<Result<'T, 'E>>

Delay

this.Delay
Member

Parameters

NameTypeDescription
funit -> Workflow<Result<'T, 'E>>

Returns

Workflow<Result<'T, 'E>>

For

this.For
Member

Parameters

NameTypeDescription
items'A seq
body'A -> Workflow<Result<unit, 'E>>

Returns

Workflow<Result<unit, 'E>>

MergeSources

this.MergeSources
Member
`let! a = first and! b = second` runs both together. Both run to the end; the result is the first branch's `Error` if it has one, else the second's.

Parameters

NameTypeDescription
firstWorkflow<Result<'A, 'E>>
secondWorkflow<Result<'B, 'E>>

Returns

Workflow<Result<('A * 'B), 'E>>

Return

this.Return
Member

Parameters

NameTypeDescription
value'T

Returns

Workflow<Result<'T, 'E>>

ReturnFrom

this.ReturnFrom
Member

Parameters

NameTypeDescription
workflowWorkflow<Result<'T, 'E>>

Returns

Workflow<Result<'T, 'E>>

Source

this.Source
Member

Parameters

NameTypeDescription
items'T seq

Returns

'T seq

Source

this.Source
Member

Parameters

NameTypeDescription
resultResult<'T, 'E>

Returns

Workflow<Result<'T, 'E>>

Source

this.Source
Member

Parameters

NameTypeDescription
workflowWorkflow<Result<'T, 'E>>

Returns

Workflow<Result<'T, 'E>>

TryFinally

this.TryFinally
Member

Parameters

NameTypeDescription
bodyWorkflow<Result<'T, 'E>>
compensationunit -> unit

Returns

Workflow<Result<'T, 'E>>

TryWith

this.TryWith
Member

Parameters

NameTypeDescription
bodyWorkflow<Result<'T, 'E>>
handlerexn -> Workflow<Result<'T, 'E>>

Returns

Workflow<Result<'T, 'E>>

Using

this.Using
Member

Parameters

NameTypeDescription
resource'R
body'R -> Workflow<Result<'T, 'E>>

Returns

Workflow<Result<'T, 'E>>

While

this.While
Member
Stops at the first iteration that gives an `Error`, and gives that `Error`.

Parameters

NameTypeDescription
guardunit -> bool
bodyWorkflow<Result<unit, 'E>>

Returns

Workflow<Result<unit, 'E>>

Zero

this.Zero
Member

Returns

Workflow<Result<unit, 'E>>