ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
Loading...
Searching...
No Matches
XmobiTea.Threading.Models.ScheduleTask Class Reference

Provides an implementation of a scheduled task with an action and state management. More...

Inheritance diagram for XmobiTea.Threading.Models.ScheduleTask:
XmobiTea.Threading.Models.SingleTask XmobiTea.Threading.Models.IScheduleTask XmobiTea.Threading.Models.ISingleTask XmobiTea.Threading.Models.ISingleTask XmobiTea.Threading.Models.ScheduleOnIntervalTask

Public Member Functions

 ScheduleTask (Action action)
 Initializes a new instance of the ScheduleTask class.
 
void Dispose ()
 Releases all resources used by the task.
 
virtual bool IsRunning ()
 Checks if the task is currently running and not disposed.
 
override bool Invoke ()
 Executes the task's action if it is running, and updates the running state.
 
- Public Member Functions inherited from XmobiTea.Threading.Models.SingleTask
 SingleTask (Action action)
 Initializes a new instance of the SingleTask class.
 
- Public Member Functions inherited from XmobiTea.Threading.Models.ISingleTask
- Public Member Functions inherited from XmobiTea.Threading.Models.IScheduleTask

Protected Member Functions

bool InvokeInternal ()
 Executes the task's action internally, with exception handling.
 

Additional Inherited Members

- Properties inherited from XmobiTea.Threading.Models.SingleTask
Action action [get]
 The action to be executed by this task.
 

Detailed Description

Provides an implementation of a scheduled task with an action and state management.

Constructor & Destructor Documentation

◆ ScheduleTask()

XmobiTea.Threading.Models.ScheduleTask.ScheduleTask ( Action action)

Initializes a new instance of the ScheduleTask class.

Parameters
actionThe action to be executed by the task.

Member Function Documentation

◆ Dispose()

void XmobiTea.Threading.Models.ScheduleTask.Dispose ( )

Releases all resources used by the task.

Implements XmobiTea.Threading.Models.IScheduleTask.

◆ Invoke()

override bool XmobiTea.Threading.Models.ScheduleTask.Invoke ( )
virtual

Executes the task's action if it is running, and updates the running state.

Returns
True if the task was executed successfully; otherwise, false.

Reimplemented from XmobiTea.Threading.Models.SingleTask.

◆ InvokeInternal()

bool XmobiTea.Threading.Models.ScheduleTask.InvokeInternal ( )
protected

Executes the task's action internally, with exception handling.

Returns
True if the task was executed successfully; otherwise, false.

◆ IsRunning()

virtual bool XmobiTea.Threading.Models.ScheduleTask.IsRunning ( )
virtual

Checks if the task is currently running and not disposed.

Returns
True if the task is running and not disposed; otherwise, false.

Implements XmobiTea.Threading.Models.IScheduleTask.


The documentation for this class was generated from the following file: