ResThrowIfErr Method
Returns the result back when
IsOk; throws NullReferenceException when
IsErr.
static Res MakeApiCall() {
// method that makes an api call.
// might fail; hence, returns a Res rather than void.
}
var result = MakeApiCall().ThrowIfErr();
// result will be:
// - Ok() if MakeApiCall succeeds and returns Ok;
// - the application will throw a NullReferenceException otherwise.
Namespace: Orx.Fun.ResultAssembly: Orx.Fun.Result (in Orx.Fun.Result.dll) Version: 1.3.0+344c8bdd6f720ccfb2d8db7c61b76cf02be18f5f
Return Value
Res