Class MainThreadCommand
Contains an action to execute on the main thread and its current status.
Inheritance
object
MainThreadCommand
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: InsaneScatterbrain.Threading
Syntax
public class MainThreadCommand : IMainThreadCommand
Constructors
MainThreadCommand()
Declaration
public MainThreadCommand()
MainThreadCommand(Action)
Declaration
public MainThreadCommand(Action action)
Parameters
Type | Name | Description |
---|---|---|
System.Action | action |
Properties
Done
Declaration
public bool Done { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
Cancel()
Stops executing the command as soon as possible.
Declaration
public void Cancel()
Execute()
Declaration
public void Execute()
SetAction(Action)
Declaration
public void SetAction(Action setAction)
Parameters
Type | Name | Description |
---|---|---|
System.Action | setAction |
WaitForCompletion()
Makes the calling thread wait for the completion of this command.
Declaration
public void WaitForCompletion()
Exceptions
Type | Condition |
---|---|
System.Exception | If an exception occurred while executing the command, it will be rethrown here to the calling thread. |