Method Match
Match<T>(Func<T>, Func<Exception, T>)
Runs the handler for the end of this item, and returns its value.
public T Match<T>(Func<T> onSucceeded, Func<Exception, T> onFailed)
Parameters
onSucceededFunc<T>Handles an operation that returned.
onFailedFunc<Exception, T>Handles a run with an error, with the exception from the operation.
Returns
- T
The value that the handler returned.
Type Parameters
TThe type that each handler returns.