![]() |
BadScript 2
|
Represents the result of a computation. More...
Public Member Functions | |
override string | ToString () |
Static Public Member Functions | |
static Result< TSuccess, TMessage > | FailWith< TSuccess, TMessage > (IEnumerable< TMessage > messages) |
Creates a Failure result with the given messages. | |
static Result< TSuccess, TMessage > | FailWith< TSuccess, TMessage > (TMessage message) |
Creates a Failure result with the given message. | |
static Result< TSuccess, TMessage > | Succeed< TSuccess, TMessage > (TSuccess value) |
Creates a Success result with the given value. | |
static Result< TSuccess, TMessage > | Succeed< TSuccess, TMessage > (TSuccess value, TMessage message) |
Creates a Success result with the given value and the given message. | |
static Result< TSuccess, TMessage > | Succeed< TSuccess, TMessage > (TSuccess value, IEnumerable< TMessage > messages) |
Creates a Success result with the given value and the given messages. | |
static Result< TSuccess, Exception > | Try< TSuccess > (Func< TSuccess > func) |
Executes the given function on a given success or captures the failure. | |
Protected Member Functions | |
Result (ResultType tag) | |
Properties | |
ResultType | Tag [get] |
Represents the result of a computation.
TSuccess | Type that models the result of a successful computation. |
TMessage | Type that model a message related to a computation. |
Definition at line 32 of file ErrorHandling.cs.
|
protected |
Definition at line 34 of file ErrorHandling.cs.
|
static |
Creates a Failure result with the given messages.
Definition at line 122 of file ErrorHandling.cs.
|
static |
Creates a Failure result with the given message.
Definition at line 135 of file ErrorHandling.cs.
|
static |
Creates a Success result with the given value.
Definition at line 148 of file ErrorHandling.cs.
|
static |
Creates a Success result with the given value and the given messages.
Definition at line 171 of file ErrorHandling.cs.
|
static |
Creates a Success result with the given value and the given message.
Definition at line 156 of file ErrorHandling.cs.
override string RailwaySharp.ErrorHandling.Result< TSuccess, TMessage >.ToString | ( | ) |
Definition at line 41 of file ErrorHandling.cs.
|
static |
Executes the given function on a given success or captures the failure.
Definition at line 186 of file ErrorHandling.cs.
|
get |
Definition at line 39 of file ErrorHandling.cs.