Class OptionalMixins
- Namespace
- ReactiveUI.Extensions.Async
- Assembly
- ReactiveUI.Extensions.dll
Provides extension methods for working with the Optional{T} type.
public static class OptionalMixins
- Inheritance
-
OptionalMixins
Methods
TryGetValue<T>(Optional<T>, out T?)
Attempts to retrieve the value contained in the specified Optional<T> instance.
public static bool TryGetValue<T>(this Optional<T> @this, out T? value)
Parameters
thisOptional<T>The Optional<T> instance from which to retrieve the value.
valueTWhen this method returns, contains the value if the Optional<T> has a value; otherwise, the default value for type
T. This parameter is passed uninitialized.
Returns
- bool
true if the Optional<T> has a value; otherwise, false.
Type Parameters
TThe type of the value contained in the Optional<T>.