Class WorkActionExtensions
Provides methods for creating tasks from IWorkAction objects.
Inherited Members
Namespace: Evergine.Framework.Threading
Assembly: Evergine.Framework.dll
Syntax
public static class WorkActionExtensions
Methods
AsTask(IWorkAction)
Returns a task that represents a IWorkAction action.
Declaration
public static Task<bool> AsTask(this IWorkAction workAction)
Parameters
Type | Name | Description |
---|---|---|
IWorkAction | workAction | The IWorkAction. |
Returns
Type | Description |
---|---|
Task<bool> | A task that represents a IWorkAction action. |
Remarks
Use this method to get a Task object that represents a Evergine WorkAction. Task objects simplify the coordination of asynchronous operations.
AsTask<T>(IWorkAction<T>)
Returns a task that represents a IWorkAction<T> action.
Declaration
public static Task<T> AsTask<T>(this IWorkAction<T> workAction)
Parameters
Type | Name | Description |
---|---|---|
IWorkAction<T> | workAction | The IWorkAction<T>. |
Returns
Type | Description |
---|---|
Task<T> | A task that represents a IWorkAction<T> action. |
Type Parameters
Name | Description |
---|---|
T | The work action result type. |