Class PacePlayer
Controls the pace execution of a task.
public class PacePlayer : IDisposable
- Inheritance
-
PacePlayer
- Implements
- Inherited Members
- Extension Methods
Properties
CancellationToken
Gets the cancellation token for the running task.
public CancellationToken CancellationToken { get; }
Property Value
IsFinished
Is the process finished from Start().
public bool IsFinished { get; }
Property Value
IsLocked
Is started but not finished. IsLocked keeps true even if Pause() is called. The property is true if a task started and the task has not yet finished.
public bool IsLocked { get; }
Property Value
IsRunning
Is running. Not paused either finished. The property is true if a task started and the task has not yet finished and Pause() is not called.
public bool IsRunning { get; }
Property Value
MainAction
Gets or sets the main action to be executed by the player.
public Action<PacePlayee> MainAction { get; set; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Releases the unmanaged resources and optionally releases the managed resources.
protected virtual void Dispose(bool disposing)
Parameters
disposing
booltrue to release both managed and unmanaged resources; false to release only unmanaged resources.
Pause()
Pauses the execution.
public void Pause()
Reset()
Resets the player to its initial state.
public void Reset()
Resume()
Resumes the execution if paused.
public void Resume()
RunToNextPace()
Runs to the next pace point.
public void RunToNextPace()
Start()
Starts the main action execution.
public void Start()
Terminate()
Terminates the execution by cancelling the task.
public void Terminate()
Wait()
Waits for the task to complete.
public void Wait()
Events
IsLockedEventHandler
Event triggered when the lock state changes.
public event Action<bool> IsLockedEventHandler
Event Type
IsRunningChangedEvent
Event triggered when the running state changes.
public event Action<bool> IsRunningChangedEvent
Event Type
ResetedEvent
Event triggered after the player has been reset.
public event Action ResetedEvent