Interface IWorkAction
Represent 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 state of the task.
Declaration
WorkActionState State { get; }
  Property Value
| Type | Description | 
|---|---|
| WorkActionState | The state of the task.  | 
      
Methods
Cancel()
Cancels this instance.
Declaration
void Cancel()
  Run()
It starts the work-flow that contains this task.
Declaration
void Run()
  TrySkip()
The skip method cancels the current running task if it is skippable and continues with the next task. If a running task is not skippable but it has children, then 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 [skipped] the task is skipped externally.
Declaration
event Action<IWorkAction> Skipped
  Event Type
| Type | Description | 
|---|---|
| Action<IWorkAction> |