Method WhenNothing
WhenNothing<T>(Maybe<T>, Action)
Exectues the action
only if source
is empty.
Declaration
public static Maybe<T> WhenNothing<T>(this Maybe<T> source, Action action)
Parameters
Type | Name | Description |
---|---|---|
Maybe<T> | source | A Maybe<T> to check for emptiness. |
Action | action | The action to execute if |
Returns
Type | Description |
---|---|
Maybe<T> | Returns |
Type Parameters
Name | Description |
---|---|
T | The type of value contained within the maybe. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |