ResMatchDo Method

Executes whenOk() whenever IsOk; and whenErr(errorMessage) otherwise.
C#
Res<User> user = TryGetUser(..);
user.MatchDo
(
    whenOk: () => Log.Info("New user login"),
    whenErr: err => Log.Error($"Failed login. {err}")
);

Definition

Namespace: Orx.Fun.Result
Assembly: Orx.Fun.Result (in Orx.Fun.Result.dll) Version: 1.3.0+344c8bdd6f720ccfb2d8db7c61b76cf02be18f5f
C#
public void MatchDo(
	Action whenOk,
	Action<string> whenErr
)

Parameters

whenOk  Action

[Missing <param name="whenOk"/> documentation for "M:Orx.Fun.Result.Res.MatchDo(System.Action,System.Action{System.String})"]

whenErr  ActionString

[Missing <param name="whenErr"/> documentation for "M:Orx.Fun.Result.Res.MatchDo(System.Action,System.Action{System.String})"]

See Also