ResTMatchDo Method
Executes
whenOk(Unwrap()) if IsOk;
whenErr(error-message) otherwise.
Res<User> user = LoginUser(..);
user.MatchDo(
whenOk: u => Log.Info($"Logged in user: {u.Name}"),
whenErr: err => Log.Error($"Failed login. ${err}")
);
Namespace: Orx.Fun.ResultAssembly: Orx.Fun.Result (in Orx.Fun.Result.dll) Version: 1.3.0+344c8bdd6f720ccfb2d8db7c61b76cf02be18f5f
public void MatchDo(
Action<T> whenOk,
Action<string> whenErr
)
Parameters
- whenOk ActionT
- Action of the underlying value to be called lazily when IsOk.
- whenErr ActionString
- Action of error message to be called lazily when IsErr.