asOption value
Signature: value:'T opt -> 'T option
Type parameters: 'T
|
Turns the OptionalValue<T> into a corresponding standard F# option<T> value
|
bind f input
Signature: f:('T -> OptionalValue<'R>) -> input:OptionalValue<'T> -> OptionalValue<'R>
Type parameters: 'T, 'R
|
If the OptionalValue<T> does not contain a value, then returns a new
OptionalValue<R>.Empty . Otherwise, returns the result of applying the
function f to the value contained in the provided optional value.
|
defaultArg def optional
Signature: def:'T -> optional:'T opt -> 'T
Type parameters: 'T
|
Returns the value def when the argument is missing, otherwise returns its value
|
get optional
Signature: optional:'T opt -> 'T
Type parameters: 'T
|
Get the value stored in the specified optional value. If a value is not
available, throws an exception. (This is equivalent to the Value property)
|
map f input
Signature: f:('T -> 'R) -> input:OptionalValue<'T> -> OptionalValue<'R>
Type parameters: 'T, 'R
|
If the OptionalValue<T> does not contain a value, then returns a new
OptionalValue<R>.Empty . Otherwise, returns the result OptionalValue<R>
containing the result of applying the function f to the value contained
in the provided optional value.
|
map2 f input1 input2
Signature: f:('T1 -> 'T2 -> 'R) -> input1:OptionalValue<'T1> -> input2:OptionalValue<'T2> -> OptionalValue<'R>
Type parameters: 'T1, 'T2, 'R
|
If both of the arguments contain value, apply the specified function to their
values and return OptionalValue<R> with the result. Otherwise return
OptionalValue.Missing .
|
ofNullable value
Signature: value:Nullable<'T> -> 'T opt
Type parameters: 'T
|
Creates OptionalValue<T> from a .NET Nullable<T> type.
|
ofOption opt
Signature: opt:'T option -> 'T opt
Type parameters: 'T
|
Turns a standard F# option<T> value into a corresponding OptionalValue<T>
|
ofTuple (b, value)
Signature: (b:bool * value:'T) -> 'T opt
Type parameters: 'T
|
Creates OptionalValue<T> from a tuple of type bool * 'T . This function
can be used with .NET methods that use out arguments. For example:
1:
|
Int32.TryParse("42") |> OptionalValue.ofTuple
|
|