ResMatchTOut(TOut, FuncString, TOut) Method
Maps into
whenOk whenever IsOk; and into
whenErr(errorMessage) otherwise.
Res<User> user = TryGetUser(..);
string greetingMessage = user.Match("Welcome", err => $"Error getting the user: {err}");
Namespace: Orx.Fun.ResultAssembly: Orx.Fun.Result (in Orx.Fun.Result.dll) Version: 1.3.0+344c8bdd6f720ccfb2d8db7c61b76cf02be18f5f
public TOut Match<TOut>(
TOut whenOk,
Func<string, TOut> whenErr
)
- whenOk TOut
- Return value when IsOk.
- whenErr FuncString, TOut
- Map function (string -> TOut) to be called to get the return value when IsErr.
- TOut
[Missing <typeparam name="TOut"/> documentation for "M:Orx.Fun.Result.Res.Match``1(``0,System.Func{System.String,``0})"]
TOut