Class MaybeExtensions
Provides extensions to the Maybe<T> type.
Inheritance
Inherited Members
Namespace: MaybeSharp.Extensions
Assembly: cs.temp.dll.dll
Syntax
public static class MaybeExtensions
Methods
Name | Description |
---|---|
Coalesce<T>(Maybe<T>, IEnumerable<Maybe<T>>) | Coalesces this value with one or more others. If |
Coalesce<T>(Maybe<T>, Maybe<T>[]) | Coalesces this value with one or more others. If |
Or<T>(Maybe<T>, Maybe<T>) | Coalesces this value with another. If this value is empty, |
Select<T, TResult>(IEnumerable<Maybe<T>>, Func<T, Maybe<TResult>>) | Converts an |
Select<T, TResult>(Maybe<T>, Func<T, TResult>) | Converts a Maybe<T> to a Maybe{TResult} using the function provided. |
Select<T, TResult>(Maybe<T>, Func<T, Maybe<TResult>>) | Converts a Maybe<T> to a Maybe{TResult} using the function provided. |
SelectMany<T, TOther, TResult>(Maybe<T>, Func<T, Maybe<TOther>>, Func<T, TOther, TResult>) | Allows values from multiple maybe instances to be combined in the select portion of a LINQ query. |
SelectNonempty<T, TResult>(IEnumerable<Maybe<T>>, Func<T, Maybe<TResult>>) | Converts an |
ToNullable<T>(Maybe<T>) | Returns a |
ValueOr<T>(Maybe<T>, T) | Returns the value of the Maybe{T} instance if it is non-empty, otherwise returns |
ValueOr<T>(Maybe<T>, Func<T>) | Returns the value of the Maybe{T} instance if it is non-empty, otherwise returns the result of the |
ValueOrException<T>(Maybe<T>, Exception) | Returns the value of |
ValueOrException<T>(Maybe<T>, Func<Exception>) | Returns the value of |
WhenNothing<T>(Maybe<T>, Action) | Exectues the |
WhenSomething<T>(Maybe<T>, Action<T>) | Executes the |
Where<T>(Maybe<T>, Func<T, Boolean>) | Extension method allowing Maybe{T} instances to be used in LINQ where clauses. |