Methods_T_RailwaySharp_ErrorHandling_Trial - adutton/commandline GitHub Wiki
The Trial type exposes the following members.
| Name | Description | |
|---|---|---|
![]()
|
Apply(TValue, TSuccess, TMessage) | If the wrapped function is a success and the given result is a success the function is applied on the value. Otherwise the exisiting error messages are propagated. |
![]()
|
Bind(TValue, TSuccess, TMessage) | If the result is a Success it executes the given function on the value. Otherwise the exisiting failure is propagated. |
![]()
|
Collect(TSuccess, TMessage) | Collects a sequence of Results and accumulates their values. If the sequence contains an error the error will be propagated. |
![]()
|
Either(TSuccess, TMessage, TResult) | Takes a Result and maps it with successFunc if it is a Success otherwise it maps it with failureFunc. |
![]()
|
Fail(TSuccess, TMessage) | Wraps a message in a Failure. |
![]()
|
Failed(TSuccess, TMessage) | Returns true if the result was not successful. |
![]()
|
Flatten(TSuccess, TMessage) | Flattens a nested result given the Failure types are equal. |
![]()
|
Lift(TValue, TSuccess, TMessage) | Lifts a function into a Result container and applies it on the given result. |
![]()
|
Lift2(TSuccess, TMessage, TSuccess1, TMessage1) | Promote a function to a monad/applicative, scanning the monadic/applicative arguments from left to right. |
![]()
|
MergeMessages(TSuccess, TMessage) | Appends the given messages with the messages in the given result. |
![]()
|
Ok(TSuccess, TMessage) | Wraps a value in a Success. |
![]()
|
Pass(TSuccess, TMessage) | Wraps a value in a Success. |
![]()
|
ReturnOrFail(TSuccess, TMessage) | If the given result is a Success the wrapped value will be returned. Otherwise the function throws an exception with Failure message of the result. |
![]()
|
Warn(TSuccess, TMessage) | Wraps a value in a Success and adds a message. |
