Class TaskExtensions
Task extension methods.
Namespace: Neon.Common
Assembly: Neon.Common.dll
Syntax
public static class TaskExtensions
Methods
ResultWithoutAggregate<TResult>(Task<TResult>)
Waits for the task to complete and then returns the result but rethrows original exceptions rather than a wrapper ArgumentException. Otherwise, this is a replacement for Result.
Declaration
public static TResult ResultWithoutAggregate<TResult>(this Task<TResult> task)
Parameters
| Type | Name | Description |
|---|---|---|
| Task<TResult> | task | The task |
Returns
| Type | Description |
|---|---|
| TResult |
Type Parameters
| Name | Description |
|---|---|
| TResult | The task result type. |
WaitWithoutAggregate(Task)
Waits for the task to complete but rethrows original exceptions rather than a wrapper ArgumentException. Otherwise, this is a replacement for Wait().
Declaration
public static void WaitWithoutAggregate(this Task task)
Parameters
| Type | Name | Description |
|---|---|---|
| Task | task | The task |