Class Efl.Task
EFL's abstraction for a task (process). (Since EFL 1.22)
Syntax
public abstract class Task : LoopConsumer, IWrapper, IDisposable
Constructors
Task(EoWrapper.ConstructingHandle)
Subclasses should override this constructor if they are expected to be instantiated from native code. Do not call this constructor directly.
Declaration
protected Task(EoWrapper.ConstructingHandle ch)
Parameters
Type | Name | Description |
---|---|---|
Efl.Eo.EoWrapper.ConstructingHandle | ch | Tag struct storing the native handle of the object being constructed. |
Task(Object)
Initializes a new instance of the Efl.Task class.
Declaration
public Task(Object parent = null)
Parameters
Type | Name | Description |
---|---|---|
Efl.Object | parent | Parent instance. |
Task(IntPtr, Object)
Initializes a new instance of the Efl.Task class. Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.
Declaration
protected Task(IntPtr baseKlass, Object parent)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | baseKlass | The pointer to the base native Eo class. |
Efl.Object | parent | The Efl.Object parent of this instance. |
Properties
ExitCode
The final exit code of this task. This is the code that will be produced upon task completion. (Since EFL 1.22)
Declaration
public int ExitCode { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The exit code. |
Flags
Flags to further customize task's behavior. (Since EFL 1.22)
Declaration
public TaskFlags Flags { get; set; }
Property Value
Type | Description |
---|---|
Efl.TaskFlags | Desired task flags. |
Priority
The priority of this task. (Since EFL 1.22)
Declaration
public TaskPriority Priority { get; set; }
Property Value
Type | Description |
---|---|
Efl.TaskPriority | Desired priority. |
Methods
End()
Request the task end (may send a signal or interrupt signal resulting in a terminate event being triggered in the target task loop). (Since EFL 1.22)
Declaration
public virtual void End()
GetExitCode()
The final exit code of this task. This is the code that will be produced upon task completion. (Since EFL 1.22)
Declaration
public virtual int GetExitCode()
Returns
Type | Description |
---|---|
System.Int32 | The exit code. |
GetFlags()
Flags to further customize task's behavior. (Since EFL 1.22)
Declaration
public virtual TaskFlags GetFlags()
Returns
Type | Description |
---|---|
Efl.TaskFlags | Desired task flags. |
GetPriority()
The priority of this task. (Since EFL 1.22)
Declaration
public virtual TaskPriority GetPriority()
Returns
Type | Description |
---|---|
Efl.TaskPriority | Desired priority. |
OnExitEvent(EventArgs)
Method to raise event ExitEvent.
Declaration
public void OnExitEvent(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | Event to raise. |
Run()
Actually run the task. (Since EFL 1.22)
Declaration
public virtual bool Run()
Returns
Type | Description |
---|---|
System.Boolean | On success in starting the task, return true, otherwise false |
SetFlags(TaskFlags)
Flags to further customize task's behavior. (Since EFL 1.22)
Declaration
public virtual void SetFlags(TaskFlags flags)
Parameters
Type | Name | Description |
---|---|---|
Efl.TaskFlags | flags | Desired task flags. |
SetPriority(TaskPriority)
The priority of this task. (Since EFL 1.22)
Declaration
public virtual void SetPriority(TaskPriority priority)
Parameters
Type | Name | Description |
---|---|---|
Efl.TaskPriority | priority | Desired priority. |
Events
ExitEvent
Called when the task exits. You can pick up any information you need at this point such as exit_code etc. (Since EFL 1.22)
Declaration
public event EventHandler ExitEvent
Event Type
Type | Description |
---|---|
System.EventHandler |