Class OutcomeStatusResult
A factory class that provides static methods for creating
OutcomeStatusResult<TResult> immutable struct
values,
which are typically used (to avoid out
parameters) when returning an
OutcomeStatus plus one more result from a method.
Note that you must check that Status
is Succeeded
before using the
Result property.
Namespace: actionETL
Assembly: actionETL.dll
Syntax
public static class OutcomeStatusResult
Methods
Create<TResult>(OutcomeStatus, TResult)
A factory that creates a new instance of the immutable
OutcomeStatusResult<TResult> struct
, which is
typically used (to avoid out
parameters) when returning an
OutcomeStatus plus one more result from a method,
with the struct
potentially wrapped in a Task
for asynchronous methods.
Note that you must check that Status
is Succeeded
before using the
Result property.
Declaration
public static OutcomeStatusResult<TResult> Create<TResult>(OutcomeStatus status, TResult result)
Parameters
Type | Name | Description |
---|---|---|
OutcomeStatus | status | The resulting status.
Any failure status on failure (IsFailed
is |
TResult | result | The result. Only defined when |
Returns
Type | Description |
---|---|
OutcomeStatusResult<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
OutcomeStatusResult<TResult> struct
, with
Status set to
Succeeded
.
This class is typically used (to avoid out
parameters) when returning an
OutcomeStatus plus one more result from a method,
with the struct
potentially wrapped in a Task
for asynchronous methods.
Declaration
public static OutcomeStatusResult<TResult> Succeeded<TResult>(TResult result)
Parameters
Type | Name | Description |
---|---|---|
TResult | result | The result. |
Returns
Type | Description |
---|---|
OutcomeStatusResult<TResult> | The immutable |
Type Parameters
Name | Description |
---|---|
TResult | The type of the |