Method WhenSomething
WhenSomething<T>(Maybe<T>, Action<T>)
Executes the action is this instance is not nothing.
Declaration
public static Maybe<T> WhenSomething<T>(this Maybe<T> source, Action<T> action)
Parameters
| Type | Name | Description |
|---|---|---|
| Maybe<T> | source | A Maybe<T> to check for emptiness. |
| Action<T> | 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 |