ResMatchTOut(FuncTOut, FuncString, TOut) Method

Maps into whenOk() lazily whenever IsOk; and into whenErr(errorMessage) otherwise. Similar to MatchTOut(TOut, FuncString, TOut) except that whenOk is lazy and evaluated only when IsOk.

Definition

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

Parameters

whenOk  FuncTOut
Function (() -> TOut) to be called lazily to get the return value when IsOk.
whenErr  FuncString, TOut
Map function (string -> TOut) to be called to get the return value when IsErr.

Type Parameters

TOut

[Missing <typeparam name="TOut"/> documentation for "M:Orx.Fun.Result.Res.Match``1(System.Func{``0},System.Func{System.String,``0})"]

Return Value

TOut

See Also