Class TaskExtensions
Extensions for supporting async tasks.
Namespace: Codaris.Common
Assembly: Codaris.Common.dll
Syntax
public static class TaskExtensions
Methods
FireAndForget(Task, Action<Exception>)
Fires and forgets the task. Requires an action to handle any task exceptions.
public static void FireAndForget(this Task task, Action<Exception> errorHandler)
Parameters
Type | Name | Description |
---|---|---|
Task | task | The task. |
Action<Exception> | errorHandler | The error handler. |
FireAndForget(Task, Func<Exception, bool>)
Fires and forgets the task. Requires an action to handle any task exceptions.
public static void FireAndForget(this Task task, Func<Exception, bool> errorHandler)
Parameters
Type | Name | Description |
---|---|---|
Task | task | The task. |
Func<Exception, bool> | errorHandler | The error handler. |