Class MainThreadCoroutineCommand
Inherited Members
Namespace: InsaneScatterbrain.Threading
Syntax
public class MainThreadCoroutineCommand : IMainThreadCoroutineCommand, IMainThreadCommand
Constructors
MainThreadCoroutineCommand(IEnumerator)
Declaration
public MainThreadCoroutineCommand(IEnumerator action)
Parameters
Type | Name | Description |
---|---|---|
IEnumerator | action |
Properties
Done
Returns whether the command is done executing or not.
Declaration
public bool Done { get; }
Property Value
Type | Description |
---|---|
bool |
IsCancelled
Gets whether the command has been cancelled.
Declaration
public bool IsCancelled { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
Cancel()
Stops executing the command as soon as possible.
Declaration
public void Cancel()
Execute()
Executes the command.
Declaration
public void Execute()
ExecuteCoroutine()
Executes the command.
Declaration
public IEnumerator ExecuteCoroutine()
Returns
Type | Description |
---|---|
IEnumerator |
WaitForCompletion()
Makes the calling thread wait for the completion of this command.
Declaration
public void WaitForCompletion()
Exceptions
Type | Condition |
---|---|
Exception | If an exception occurred while executing the command, it will be rethrown here to the calling thread. |