- OptionalResult <A>
- OptionalResult (Option<A> value)
- OptionalResult (Exception e)
- Some (A value)
- Optional (A value)
- IsBottom
- IsFaulted
- IsNone
- IsSome
- IsFaultedOrNone
- ToString ()
- Equals (OptionalResult<A> other)
- Equals (object obj)
- GetHashCode ()
- == (OptionalResult<A> a, OptionalResult<A> b)
- != (OptionalResult<A> a, OptionalResult<A> b)
- IfFailOrNone (A defaultValue)
- IfFail (Func<Exception, A> f)
- IfFailOrNone (Action f)
- IfFail (Action<Exception> f)
- IfSucc (Action<A> f)
- Match <R> (Func<A, R> Some, Func<R> None, Func<Exception, R> Fail)
- Map <B> (Func<A, B> f)
- MapAsync <B> (Func<A, Task<B>> f)
- CompareTo (OptionalResult<A> other)
- < (OptionalResult<A> a, OptionalResult<A> b)
- <= (OptionalResult<A> a, OptionalResult<A> b)
- > (OptionalResult<A> a, OptionalResult<A> b)
- >= (OptionalResult<A> a, OptionalResult<A> b)
- ResultState
- Result <A>
- Bottom = default(Result<A>)
- Result (A value)
- Result (Exception e)
- IsFaulted
- IsBottom
- IsSuccess
- ToString ()
- Equals (Result<A> other)
- Equals (object obj)
- GetHashCode ()
- == (Result<A> a, Result<A> b)
- != (Result<A> a, Result<A> b)
- IfFail (A defaultValue)
- IfFail (Func<Exception, A> f)
- IfFail (Action<Exception> f)
- IfSucc (Action<A> f)
- Match <R> (Func<A, R> Succ, Func<Exception, R> Fail)
- Map <B> (Func<A, B> f)
- MapAsync <B> (Func<A, Task<B>> f)
- CompareTo (Result<A> other)
- < (Result<A> a, Result<A> b)
- <= (Result<A> a, Result<A> b)
- > (Result<A> a, Result<A> b)
- >= (Result<A> a, Result<A> b)
struct OptionalResult <A> Source #
Represents the result of an operation:
Some(A) | None | Exception
Result<A>
(and OptionalResult<A>
) is purely there to represent a concrete result value of a invoked lazy operation
(like Try<A>
). You're not really meant to consume it directly.
For example:
var ma = Try(...);
var ra = ma(); // This will produce a `Result<A>` because that's what the `Try` delegate returns
But you should be matching on the result, or using any of the other convenient extension methods to get a concrete value:
var ma = Try(...);
var ra1 = ma.IfFail(0);
var ra1 = ma.Match(Succ: x => x + 10, Fail: 0);
// ... etc ...
type | A | Bound value type |
property bool IsFaultedOrNone Source #
True if the result is faulted
constructor OptionalResult (Option<A> value) Source #
Constructor of a concrete value
param | value |
constructor OptionalResult (Exception e) Source #
Constructor of an error value
param | e |
method int GetHashCode () Source #
Get hash code for bound value
method A IfFailOrNone (A defaultValue) Source #
method Unit IfFailOrNone (Action f) Source #
enum ResultState Source #
Represents the result of an operation:
A | Exception
Result<A>
(and OptionalResult<A>
) is purely there to represent a concrete result value of a invoked lazy operation
(like Try<A>
). You're not really meant to consume it directly.
For example:
var ma = Try(...);
var ra = ma(); // This will produce a `Result<A>` because that's what the `Try` delegate returns
But you should be matching on the result, or using any of the other convenient extension methods to get a concrete value:
var ma = Try(...);
var ra1 = ma.IfFail(0);
var ra1 = ma.Match(Succ: x => x + 10, Fail: 0);
// ... etc ...
type | A | Bound value type |
field Result<A> Bottom = default(Result<A>) Source #
method int GetHashCode () Source #
Get hash code for bound value