- OptionalUnsafeAsync <OA, A>
- OptionalUnsafeAsync
- ifSomeAsync <OPT, OA, A> (OA opt, Action<A> f)
- ifSomeAsync <OPT, OA, A> (OA opt, Func<A, Unit> f)
- ifSomeAsync <OPT, OA, A> (OA opt, Func<A, Task<Unit>> f)
- ifNoneAsync <OPT, OA, A> (OA opt, Func<A> None)
- ifNoneAsync <OPT, OA, A> (OA opt, Func<Task<A>> None)
- ifNoneAsync <OPT, OA, A> (OA opt, A noneValue)
- ifNoneUnsafeAsync <OPT, OA, A> (OA opt, Func<A> None)
- ifNoneUnsafeAsync <OPT, OA, A> (OA opt, Func<Task<A>> None)
- ifNoneUnsafeAsync <OPT, OA, A> (OA opt, A noneValue)
- matchAsync <OPT, OA, A, R> (OA ma, Func<A, R> Some, Func<R> None)
- matchAsync <OPT, OA, A, R> (OA ma, Func<A, Task<R>> Some, Func<R> None)
- matchAsync <OPT, OA, A, R> (OA ma, Func<A, R> Some, Func<Task<R>> None)
- matchAsync <OPT, OA, A, R> (OA ma, Func<A, Task<R>> Some, Func<Task<R>> None)
- matchUnsafeAsync <OPT, OA, A, R> (OA ma, Func<A, R> Some, Func<R> None)
- matchUnsafeAsync <OPT, OA, A, R> (OA ma, Func<A, Task<R>> Some, Func<R> None)
- matchUnsafeAsync <OPT, OA, A, R> (OA ma, Func<A, R> Some, Func<Task<R>> None)
- matchUnsafeAsync <OPT, OA, A, R> (OA ma, Func<A, Task<R>> Some, Func<Task<R>> None)
- matchUntypedAsync <OPT, OA, A, R> (OA ma, Func<object, R> Some, Func<R> None)
- matchUntypedAsync <OPT, OA, A, R> (OA ma, Func<object, Task<R>> SomeAsync, Func<R> None)
- matchUntypedAsync <OPT, OA, A, R> (OA ma, Func<object, R> Some, Func<Task<R>> NoneAsync)
- matchUntypedAsync <OPT, OA, A, R> (OA ma, Func<object, Task<R>> SomeAsync, Func<Task<R>> NoneAsync)
- toArrayAsync <OPT, OA, A> (OA ma)
- toListAsync <OPT, OA, A> (OA ma)
- asEnumerableAsync <OPT, OA, A> (OA ma)
- toEitherAsync <OPT, OA, L, A> (OA ma, L defaultLeftValue)
- toEitherAsync <OPT, OA, L, A> (OA ma, Func<L> Left)
- toEitherUnsafeAsync <OPT, OA, L, A> (OA ma, L defaultLeftValue)
- toEitherUnsafeAsync <OPT, OA, L, A> (OA ma, Func<L> Left)
- toOptionAsync <OPT, OA, A> (OA ma)
- toOptionUnsafeAsync <OPT, OA, A> (OA ma)
- toTryOptionAsync <OPT, OA, A> (OA ma)
- toTryAsync <OPT, OA, A> (OA ma)
interface OptionalUnsafeAsync <OA, A> Source #
class OptionalUnsafeAsync Source #
method Task<Unit> ifSomeAsync <OPT, OA, A> (OA opt, Action<A> f) Source #
Invokes the f action if Option is in the Some state, otherwise nothing happens.
method Task<Unit> ifSomeAsync <OPT, OA, A> (OA opt, Func<A, Unit> f) Source #
Invokes the f function if Option is in the Some state, otherwise nothing happens.
method Task<Unit> ifSomeAsync <OPT, OA, A> (OA opt, Func<A, Task<Unit>> f) Source #
Invokes the f function if Option is in the Some state, otherwise nothing happens.
method Task<A> ifNoneAsync <OPT, OA, A> (OA opt, Func<A> None) Source #
Returns the result of invoking the None() operation if the optional is in a None state, otherwise the bound Some(x) value is returned.
Will not accept a null return value from the None operation
param | None | Operation to invoke if the structure is in a None state |
returns | Tesult of invoking the None() operation if the optional is in a None state, otherwise the bound Some(x) value is returned. |
method Task<A> ifNoneAsync <OPT, OA, A> (OA opt, Func<Task<A>> None) Source #
Returns the result of invoking the None() operation if the optional is in a None state, otherwise the bound Some(x) value is returned.
Will not accept a null return value from the None operation
param | None | Operation to invoke if the structure is in a None state |
returns | Tesult of invoking the None() operation if the optional is in a None state, otherwise the bound Some(x) value is returned. |
method Task<A> ifNoneAsync <OPT, OA, A> (OA opt, A noneValue) Source #
Returns the noneValue if the optional is in a None state, otherwise the bound Some(x) value is returned.
Will not accept a null noneValue
param | noneValue | Value to return if in a None state |
returns | noneValue if the optional is in a None state, otherwise the bound Some(x) value is returned |
method Task<A> ifNoneUnsafeAsync <OPT, OA, A> (OA opt, Func<A> None) Source #
Returns the result of invoking the None() operation if the optional is in a None state, otherwise the bound Some(x) value is returned.
Will allow null the be returned from the None operation
param | None | Operation to invoke if the structure is in a None state |
returns | Tesult of invoking the None() operation if the optional is in a None state, otherwise the bound Some(x) value is returned. |
method Task<A> ifNoneUnsafeAsync <OPT, OA, A> (OA opt, Func<Task<A>> None) Source #
Returns the result of invoking the None() operation if the optional is in a None state, otherwise the bound Some(x) value is returned.
Will allow null the be returned from the None operation
param | None | Operation to invoke if the structure is in a None state |
returns | Tesult of invoking the None() operation if the optional is in a None state, otherwise the bound Some(x) value is returned. |
method Task<A> ifNoneUnsafeAsync <OPT, OA, A> (OA opt, A noneValue) Source #
Returns the noneValue if the optional is in a None state, otherwise the bound Some(x) value is returned.
Will allow noneValue to be null
param | noneValue | Value to return if in a None state |
returns | noneValue if the optional is in a None state, otherwise the bound Some(x) value is returned |
method Task<R> matchAsync <OPT, OA, A, R> (OA ma, Func<A, R> Some, Func<R> None) Source #
Pattern match operation
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<R> matchAsync <OPT, OA, A, R> (OA ma, Func<A, Task<R>> Some, Func<R> None) Source #
Pattern match operation
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<R> matchAsync <OPT, OA, A, R> (OA ma, Func<A, R> Some, Func<Task<R>> None) Source #
Pattern match operation
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<R> matchAsync <OPT, OA, A, R> (OA ma, Func<A, Task<R>> Some, Func<Task<R>> None) Source #
Pattern match operation
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<R> matchUnsafeAsync <OPT, OA, A, R> (OA ma, Func<A, R> Some, Func<R> None) Source #
Pattern match operation
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<R> matchUnsafeAsync <OPT, OA, A, R> (OA ma, Func<A, Task<R>> Some, Func<R> None) Source #
Pattern match operation
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<R> matchUnsafeAsync <OPT, OA, A, R> (OA ma, Func<A, R> Some, Func<Task<R>> None) Source #
Pattern match operation
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<R> matchUnsafeAsync <OPT, OA, A, R> (OA ma, Func<A, Task<R>> Some, Func<Task<R>> None) Source #
Pattern match operation
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<R> matchUntypedAsync <OPT, OA, A, R> (OA ma, Func<object, R> Some, Func<R> None) Source #
Match operation with an untyped value for Some. This can be useful for serialisation and dealing with the IOptional interface
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<R> matchUntypedAsync <OPT, OA, A, R> (OA ma, Func<object, Task<R>> SomeAsync, Func<R> None) Source #
Match operation with an untyped value for Some. This can be useful for serialisation and dealing with the IOptional interface
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<R> matchUntypedAsync <OPT, OA, A, R> (OA ma, Func<object, R> Some, Func<Task<R>> NoneAsync) Source #
Match operation with an untyped value for Some. This can be useful for serialisation and dealing with the IOptional interface
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<R> matchUntypedAsync <OPT, OA, A, R> (OA ma, Func<object, Task<R>> SomeAsync, Func<Task<R>> NoneAsync) Source #
Match operation with an untyped value for Some. This can be useful for serialisation and dealing with the IOptional interface
type | R | The return type |
param | Some | Operation to perform if the option is in a Some state |
param | None | Operation to perform if the option is in a None state |
returns | The result of the match operation |
method Task<Arr<A>> toArrayAsync <OPT, OA, A> (OA ma) Source #
Convert the Option to an enumerable of zero or one items
param | ma | Option |
returns | An enumerable of zero or one items |
method Task<Lst<A>> toListAsync <OPT, OA, A> (OA ma) Source #
Convert the Option to an immutable list of zero or one items
param | ma | Option |
returns | An immutable list of zero or one items |
method Task<Seq<A>> asEnumerableAsync <OPT, OA, A> (OA ma) Source #
Convert the Option to an enumerable of zero or one items
type | A | Bound value type |
param | ma | Option |
returns | An enumerable of zero or one items |
method Task<Either<L, A>> toEitherAsync <OPT, OA, L, A> (OA ma, L defaultLeftValue) Source #
Convert the structure to an Either
method Task<Either<L, A>> toEitherAsync <OPT, OA, L, A> (OA ma, Func<L> Left) Source #
Convert the structure to an Either
method Task<EitherUnsafe<L, A>> toEitherUnsafeAsync <OPT, OA, L, A> (OA ma, L defaultLeftValue) Source #
Convert the structure to an EitherUnsafe
method Task<EitherUnsafe<L, A>> toEitherUnsafeAsync <OPT, OA, L, A> (OA ma, Func<L> Left) Source #
Convert the structure to an EitherUnsafe
method OptionAsync<A> toOptionAsync <OPT, OA, A> (OA ma) Source #
Convert the structure to a Option
method Task<OptionUnsafe<A>> toOptionUnsafeAsync <OPT, OA, A> (OA ma) Source #
Convert the structure to a OptionUnsafe
method TryOptionAsync<A> toTryOptionAsync <OPT, OA, A> (OA ma) Source #
Convert the structure to a TryOptionAsync
method TryAsync<A> toTryAsync <OPT, OA, A> (OA ma) Source #
Convert the structure to a TryAsync