Class ProgressStatusResult
A factory class that provides static methods for creating
ProgressStatusResult<TResult> immutable struct values,
which are typically used (to avoid out parameters) when returning an
ProgressStatus plus one more result from a method.
This is e.g. used by
OnOutputRowDemand().
This struct can also be wrapped in a Task
when returning from asynchronous methods.
Note that you must ensure Status
is NotCompleted or Succeeded (or IsFailed
is false) before using the
Result property.
Namespace: actionETL
Assembly: actionETL.dll
Syntax
public static class ProgressStatusResult
Methods
Create<TResult>(ProgressStatus, TResult)
A factory that creates a new instance of the immutable
ProgressStatusResult<TResult> struct,
which are typically used (to avoid out parameters) when returning an
ProgressStatus plus one more result from a method.
This is e.g. used by
OnOutputRowDemand().
This struct can also be wrapped in a Task
when returning from asynchronous methods.
Declaration
public static ProgressStatusResult<TResult> Create<TResult>(ProgressStatus status, TResult result)
Parameters
| Type | Name | Description |
|---|---|---|
| ProgressStatus | status | The resulting status.
A failure status on failure (IsFailed
is |
| TResult | result | The result. Only defined when |
Returns
| Type | Description |
|---|---|
| ProgressStatusResult<TResult> | The immutable |
Type Parameters
| Name | Description |
|---|---|
| TResult | The type of the |
NotCompleted<TResult>(TResult)
A factory that creates a new instance of the immutable
ProgressStatusResult<TResult> struct, with
Status set to
NotCompleted.
The class is typically used (to avoid out parameters) when returning an
ProgressStatus plus one more result from a method.
This is e.g. used by
OnOutputRowDemand().
This struct can also be wrapped in a Task
when returning from asynchronous methods.
Declaration
public static ProgressStatusResult<TResult> NotCompleted<TResult>(TResult result)
Parameters
| Type | Name | Description |
|---|---|---|
| TResult | result | The result. |
Returns
| Type | Description |
|---|---|
| ProgressStatusResult<TResult> | The immutable |
Type Parameters
| Name | Description |
|---|---|
| TResult | The type of the |
Succeeded<TResult>(TResult)
A factory that creates a new instance of the immutable
ProgressStatusResult<TResult> struct, with
Status set to
Succeeded.
The class is typically used (to avoid out parameters) when returning an
ProgressStatus plus one more result from a method.
This is e.g. used by
OnOutputRowDemand().
This struct can also be wrapped in a Task
when returning from asynchronous methods.
Declaration
public static ProgressStatusResult<TResult> Succeeded<TResult>(TResult result)
Parameters
| Type | Name | Description |
|---|---|---|
| TResult | result | The result. |
Returns
| Type | Description |
|---|---|
| ProgressStatusResult<TResult> | The immutable |
Type Parameters
| Name | Description |
|---|---|
| TResult | The type of the |