Method OnSuccess
OnSuccess(Action<T>)
Executes specified function if result represents successful action.
public Result OnSuccess(Action<T> action)
Parameters
action
Action<T>Function to execute.
Returns
- Result
Current result if action was not succeed; otherwise executes specified action and returns OK result.
OnSuccess(Func<T>)
Executes specified function if result represents successful action.
public Result<T> OnSuccess(Func<T> func)
Parameters
func
Func<T>Function to execute.
Returns
- Result<T>
Current result if action was not succeed; otherwise result of executing specified function.
OnSuccess(Func<Result<T>>)
Executes specified function if result represents successful action.
public Result<T> OnSuccess(Func<Result<T>> func)
Parameters
Returns
- Result<T>
Current result if action was not succeed; otherwise result of executing specified function.
OnSuccess(Func<T, Result>)
Executes specified function if result represents successful action.
public Result OnSuccess(Func<T, Result> func)
Parameters
Returns
- Result
Current result if action was not succeed; otherwise result of executing specified function.