Class TaskExtensions
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
public static class TaskExtensions
- Inheritance
-
TaskExtensions
- Inherited Members
Methods
CatchAndLog(Task, bool)
Executes the Task asynchronously as a fire-and-forget operation and forwards any exceptions to UnhandledExceptionHandler.
public static void CatchAndLog(this Task task, bool ignoreExceptions = false)
Parameters
task
TaskThe task to be executed.
ignoreExceptions
boolIf set to true, exceptions are ignored; otherwise, exceptions are forwarded to the global exception handler.
CatchAndLog(ValueTask, bool)
Executes the ValueTask asynchronously as a fire-and-forget operation and forwards any exceptions to UnhandledExceptionHandler.
public static void CatchAndLog(this ValueTask task, bool ignoreExceptions = false)
Parameters
task
ValueTaskThe task to be executed.
ignoreExceptions
boolIf set to true, exceptions are ignored; otherwise, exceptions are forwarded to the global exception handler.
CatchAndLog<T>(ValueTask<T>, bool)
Executes the ValueTask<TResult> asynchronously as a fire-and-forget operation and forwards any exceptions to UnhandledExceptionHandler.
public static void CatchAndLog<T>(this ValueTask<T> task, bool ignoreExceptions = false)
Parameters
task
ValueTask<T>The task to be executed.
ignoreExceptions
boolIf set to true, exceptions are ignored; otherwise, exceptions are forwarded to the global exception handler.
Type Parameters
T