Class EnumerablePlayer
public class EnumerablePlayer : IDisposable
- Inheritance
-
EnumerablePlayer
- Implements
- Inherited Members
- Extension Methods
Constructors
EnumerablePlayer()
Ctor.
public EnumerablePlayer()
Properties
Actions
Collection of actions to be executed by the player.
public IEnumerable<Action> Actions { get; set; }
Property Value
ExceptionAction
Action to handle exceptions that occur during execution.
public Action<Exception> ExceptionAction { get; set; }
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
ResettingSemaphore
internal use.
public SemaphoreSlim ResettingSemaphore { get; set; }
Property Value
Methods
BreakAsync()
Breaks the current execution asynchronously.
public Task BreakAsync()
Returns
- Task
A task representing the asynchronous operation.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
Pause()
Pauses the execution of actions.
public void Pause()
Reset()
Resets the player synchronously.
public void Reset()
ResetAsync()
Asynchronously resets the player.
public Task ResetAsync()
Returns
- Task
A task representing the asynchronous operation.
Resume()
Resume the process.
public void Resume()
RunToOneActionEnd()
Runs the player until one action completes.
public void RunToOneActionEnd()
Start()
Start the process.
public Task Start()
Returns
Terminate()
Terminates the execution of actions synchronously.
public void Terminate()
TerminateAsync()
Terminates the execution of actions asynchronously.
public Task TerminateAsync()
Returns
- Task
A task representing the asynchronous operation.
WaitPlayingTask()
Wait playing to an end. Wait Hi.Common.EnumerablePlayer.PlayingTask.
public void WaitPlayingTask()
Events
EndedEvent
Event triggered when the player ends.
public event Action EndedEvent
Event Type
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
OnCallingTerminate
Event triggered when termination is being called.
public event EventHandler OnCallingTerminate
Event Type
OnFinished
Event triggered when the player has finished playing all actions
public event EventHandler OnFinished
Event Type
ResetedEvent
Event triggered after the player has been reset.
public event Func<Task> ResetedEvent
Event Type
ResetingEvent
Event triggered before resetting the player.
public event Func<Task> ResetingEvent
Event Type
StartingEvent
Event triggered when the player starts.
public event Action StartingEvent