Creates a new task instance.
Builder used to create the task.
Name of the task.
Configuration for the task.
Input data for the task.
Protected_progressProgress of the task (range 0 to 1).
Protected_resultTask result, wrapped in an Optional object.
Protected_statusCurrent status of the task.
ReadonlybuilderBuilder used to create the task.
ReadonlydataInput data for the task.
ReadonlyidUnique identifier for the task.
ProtectedloggerLogger for task-related events.
ReadonlynameName of the task.
Progress of the task (range 0 to 1).
Updates the task progress.
New progress value (0 to 1).
Task result, wrapped in an Optional object.
Sets the task result.
Result to set.
Current status of the task.
Updates the task status.
New status to set.
Removes all listeners for all event types, as well as all global listeners.
The EventEmitter instance itself, allowing for method chaining.
Emits an event of a specific type, invoking all registered listeners for that event type with the provided data. Also calls any global event listeners with a GlobalEvent object.
Event type.
The identifier for the event type to emit.
The data to pass to the event listeners. The type of this data is defined by the corresponding value in TEvents.
The EventEmitter instance itself, allowing for method chaining.
Checks if the task status matches any of the provided statuses.
List of statuses to check.
true if the current status matches one of the provided statuses.
Removes a previously registered event listener for a specified event type. Use this method to unregister listeners when they are no longer needed, preventing potential memory leaks.
Event type.
The identifier for the event type from which to remove the listener.
The callback function to unregister.
The EventEmitter instance itself, allowing for method chaining.
Removes a previously registered global event listener.
The global event listener to remove.
The EventEmitter instance itself, allowing for method chaining.
Adds an event listener for a specified event type. This method allows you to specify which event you are interested in listening to and to provide a callback function that will be executed whenever that event is emitted.
Event type.
The identifier for the event type to listen for.
The callback function that will be called when the event is emitted.
The EventEmitter instance itself, allowing for method chaining.
Adds a global event listener that is called for every emitted event.
The global event listener to add.
The EventEmitter instance itself, allowing for method chaining.
Parses the task for UI rendering.
Parsed task data.
ProtectedsetSets the task status.
Status to set.
Instance of the task for chaining.
Single task within the task management system.