Interface IWorkAction
Represents a Work Action to perform something.
Namespace: Evergine.Framework.Services
Assembly: Evergine.Framework.dll
Syntax
public interface IWorkAction
Properties
ChildActions
Gets the child tasks.
Declaration
IEnumerable<IWorkAction> ChildActions { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IWorkAction> | The child tasks. |
Scene
Gets the scene.
Declaration
Scene Scene { get; }
Property Value
Type | Description |
---|---|
Scene | The scene that owns this task. If it is null, it can be considered a global task. |
State
Gets the status of the task.
Declaration
WorkActionState State { get; }
Property Value
Type | Description |
---|---|
WorkActionState | The status of the task. |
Methods
Cancel()
Cancels this instance.
Declaration
void Cancel()
Run()
Starts the workflow that contains this task.
Declaration
void Run()
TrySkip()
The skip method cancels the currently running task if it is skippable and continues with the next task. If a running task is not skippable but has children, it searches its internal running task and tries to skip it recursively.
Declaration
bool TrySkip()
Returns
Type | Description |
---|---|
bool | If the action is skipped successfully. |
Events
Canceled
Occurs when canceled.
Declaration
event Action<IWorkAction> Canceled
Event Type
Type | Description |
---|---|
Action<IWorkAction> |
Completed
Occurs when completed.
Declaration
event Action<IWorkAction> Completed
Event Type
Type | Description |
---|---|
Action<IWorkAction> |
Skipped
Occurs when the task is skipped externally.
Declaration
event Action<IWorkAction> Skipped
Event Type
Type | Description |
---|---|
Action<IWorkAction> |