Table of Contents

Method OnSuccess

Namespace
Alternet.Common
Assembly
Alternet.Common.v9.dll

OnSuccess(Action<T>)

Executes specified function if result represents successful action.

public Result OnSuccess(Action<T> action)

Parameters

action Action<T>

Function to execute.

Returns

Result

Current result if action was not succeed; otherwise executes specified action and returns OK result.

OnSuccess(Func<T>)

Executes specified function if result represents successful action.

public Result<T> OnSuccess(Func<T> func)

Parameters

func Func<T>

Function to execute.

Returns

Result<T>

Current result if action was not succeed; otherwise result of executing specified function.

OnSuccess(Func<Result<T>>)

Executes specified function if result represents successful action.

public Result<T> OnSuccess(Func<Result<T>> func)

Parameters

func Func<Result<T>>

Function to execute.

Returns

Result<T>

Current result if action was not succeed; otherwise result of executing specified function.

OnSuccess(Func<T, Result>)

Executes specified function if result represents successful action.

public Result OnSuccess(Func<T, Result> func)

Parameters

func Func<T, Result>

Function to execute.

Returns

Result

Current result if action was not succeed; otherwise result of executing specified function.