Class WorkActionExtensions
Provides methods for creating tasks from IWork
Inherited Members
Namespace: Evergine.Framework.Threading
Assembly: Evergine.Framework.dll
Syntax
public static class WorkActionExtensions
Methods
AsTask(IWorkAction)
Returns a task that represents a IWork
Declaration
public static Task<bool> AsTask(this IWorkAction workAction)
Parameters
Type | Name | Description |
---|---|---|
IWork |
workAction | The IWork |
Returns
Type | Description |
---|---|
Task<bool> | A task that represents a IWork |
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 IWork
Declaration
public static Task<T> AsTask<T>(this IWorkAction<T> workAction)
Parameters
Type | Name | Description |
---|---|---|
IWork |
workAction | The IWork |
Returns
Type | Description |
---|---|
Task<T> | A task that represents a IWork |
Type Parameters
Name | Description |
---|---|
T | The work action result type. |