UxrCancellableController Class
Parent abstract class for UxrLoopController and UxrTaskController.
Inheritance Hierarchy
System.Object
UltimateXR.Core.Threading.TaskControllers.UxrCancellableController
UltimateXR.Core.Threading.TaskControllers.UxrLoopController
UltimateXR.Core.Threading.TaskControllers.UxrTaskController
Namespace: UltimateXR.Core.Threading.TaskControllers
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public abstract class UxrCancellableController
The UxrCancellableController type exposes the following members.
Constructors
Name | Description | |
---|---|---|
UxrCancellableController | Constructor. |
Properties
Name | Description | |
---|---|---|
IsRunning | Gets whether the inner job is currently running. |
Methods
Name | Description | |
---|---|---|
Start() | Starts running inner job until completion or Stop() is called. | |
Start(Int32) | Similar to Start(), but it automatically calls Stop() after duration milliseconds. | |
Start(Single) | Similar to Start(), but it automatically calls Stop() after duration seconds. | |
StartAfter | Similar to Start(), but adding an initial delay. | |
StartInternal | Implements the internal logic between with Start() and Stop(). | |
Stop | Cancels the inner job. |
Events
Name | Description | |
---|---|---|
Completed | Triggered when the inner job is completed, without having been canceled. |
Extension Methods
Name | Description | |
---|---|---|
ThrowIfNull | Throws an exception if the object is null. (Defined by ObjectExt.) |
Remarks
Wraps a CancellationTokenSource into a Start() and Stop() pattern, ensuring that Stop() is called when the application quits.