C# Class Rubberduck.UI.Command.MenuItems.UiDispatcher

显示文件 Open project: retailcoder/Rubberduck Class Usage Examples

Private Properties

Property Type Description
CheckInitialization void

Public Methods

Method Description
Initialize ( ) : void
Invoke ( System.Action action ) : void

Executes an action on the UI thread. If this method is called from the UI thread, the action is executed immendiately. If the method is called from another thread, the action will be enqueued on the UI thread's dispatcher and executed asynchronously.

For additional operations on the UI thread, you can get a reference to the UI thread's context thanks to the property UiContext

.

InvokeAsync ( System.Action action ) : void

Invokes an action asynchronously on the UI thread.

Private Methods

Method Description
CheckInitialization ( ) : void

Method Details

Initialize() public static method

public static Initialize ( ) : void
return void

Invoke() public static method

Executes an action on the UI thread. If this method is called from the UI thread, the action is executed immendiately. If the method is called from another thread, the action will be enqueued on the UI thread's dispatcher and executed asynchronously.

For additional operations on the UI thread, you can get a reference to the UI thread's context thanks to the property UiContext

.
public static Invoke ( System.Action action ) : void
action System.Action The action that will be executed on the UI /// thread.
return void

InvokeAsync() public static method

Invokes an action asynchronously on the UI thread.
public static InvokeAsync ( System.Action action ) : void
action System.Action The action that must be executed.
return void