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

NameDescription
Protected methodUxrCancellableController Constructor.

Properties

NameDescription
Public propertyIsRunning Gets whether the inner job is currently running.

Methods

NameDescription
Public methodStart() Starts running inner job until completion or Stop() is called.
Public methodStart(Int32) Similar to Start(), but it automatically calls Stop() after duration milliseconds.
Public methodStart(Single) Similar to Start(), but it automatically calls Stop() after duration seconds.
Public methodStartAfter Similar to Start(), but adding an initial delay.
Protected methodStartInternal Implements the internal logic between with Start() and Stop().
Public methodStop Cancels the inner job.

Events

NameDescription
Public eventCompleted Triggered when the inner job is completed, without having been canceled.

Extension Methods

NameDescription
Public Extension MethodThrowIfNull 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.

See Also

Reference

UltimateXR.Core.Threading.TaskControllers Namespace