ResDo Method

Runs action() only if IsOk; and returns itself back.
C#
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.

Definition

Namespace: Orx.Fun.Result
Assembly: Orx.Fun.Result (in Orx.Fun.Result.dll) Version: 1.3.0+344c8bdd6f720ccfb2d8db7c61b76cf02be18f5f
C#
public Res Do(
	Action action
)

Parameters

action  Action
Action to be executed only if this IsOk.

Return Value

Res

See Also