ResDoIfErr(Action) Method
Runs
action() only if IsErr; and returns itself back.
This is the counterpart of the
Do(Action) method.
Res result = RefreshIndices(/*inputs*/).DoIfErr(() => Alert("database connection failed"));
// result will be:
// - Ok if refreshing db indices succeeded;
// - Err if it failed, in which case the Alert call will be made.
Namespace: Orx.Fun.ResultAssembly: Orx.Fun.Result (in Orx.Fun.Result.dll) Version: 1.3.0+344c8bdd6f720ccfb2d8db7c61b76cf02be18f5f
public Res DoIfErr(
Action action
)
- action Action
- Action to be executed only if this IsErr.
Res