Class Result.AsyncCatcher<TValue>
Inheritance
Result.AsyncCatcher<TValue>
Assembly: Recore.dll
Syntax
public sealed class AsyncCatcher<TValue>
Type Parameters
Methods
|
Improve this Doc
View Source
CatchAsync<TException>()
Executes the stored function and catches exceptions of the given type.
Declaration
public Task<Result<TValue, TException>> CatchAsync<TException>()
where TException : Exception
Returns
Type Parameters
| Name |
Description |
| TException |
|
|
Improve this Doc
View Source
CatchAsync<TException, TResult>(AsyncFunc<TException, TResult>)
Executes the stored function and catches exceptions of the given type matching the given predicate.
Declaration
public Task<Result<TValue, TResult>> CatchAsync<TException, TResult>(AsyncFunc<TException, TResult> onException)
where TException : Exception
Parameters
| Type |
Name |
Description |
| AsyncFunc<TException, TResult> |
onException |
|
Returns
Type Parameters
| Name |
Description |
| TException |
|
| TResult |
|
Extension Methods