ResDo Method
Runs
action() only if IsOk; and returns itself back.
User user = CreateUser(/*inputs*/);
Res result = TryPutUserToDb(user).Do(Log.Success("user created"));
// result will be:
// - Ok if TryPutUserToDb succeeds and returns Ok; in this case the success message will be logged; or
// - Err if TryPutUserToDb returns Err; and the success message log will not be called.
Namespace: Orx.Fun.ResultAssembly: Orx.Fun.Result (in Orx.Fun.Result.dll) Version: 1.3.0+344c8bdd6f720ccfb2d8db7c61b76cf02be18f5f
public Res Do(
Action action
)
- action Action
- Action to be executed only if this IsOk.
Res