System.Object
Eplan.EplApi.Base.Internal.EplanMainThreadDispatcher
System.Object
Eplan.EplApi.Base.Internal.EplanMainThreadDispatcher
//run an action asynchronously eplanMainThreadDispatcher.ExecuteInMainThreadAsync( () => { new CommandLineInterpreter().Execute("check /TYPE:PROJECT"); } ); //create a progress bar with a background work using (Progress progress = new Progress("SimpleProgress")) { eplanMainThreadDispatcher.AddProgressBackgroundWork(progress, () => { new CommandLineInterpreter().Execute("check /TYPE:PROJECT"); } ); }
Name | Description | |
---|---|---|
EplanMainThreadDispatcher Constructor | Creates a new dispatcher |
Name | Description | |
---|---|---|
AddProgressBackgroundWork | Allows the user to add a progress bar when main thread is working. | |
CanAccessMainThread | Allows the user to access the main thread both synchronously and asynchronously. | |
Dispose | Destructor for deterministic finalization of EplanMainThreadDispatcher object. | |
ExecuteInMainThreadAsync | Overloaded. Execute this work in a asynchronous main thread. | |
ExecuteInMainThreadSync | Execute this work in a synchronous main thread. | |
GetMainThreadDispatcher | Allows to use the dispatcher to work on synchronous and asynchronous threads. |