DispatcherExtensions Class
Extension methods for Dispatcher to enable async/await patterns.
public static class DispatcherExtensionsNested types
| Name | Description |
|---|---|
| DispatcherExtensions.SwitchToUiAwaitable | An awaitable that switches execution to the UI thread. |
Methods
| Name | Description |
|---|---|
| SwitchToDispatcherThread(Dispatcher) | Returns an awaitable that switches execution to the dispatcher thread. |
SwitchToDispatcherThread(Dispatcher)
DispatcherExtensions.csReturns an awaitable that switches execution to the dispatcher thread.
public static DispatcherExtensions.SwitchToUiAwaitable SwitchToDispatcherThread(this Dispatcher dispatcher)Parameters
dispatcherDispatcher- The dispatcher to switch to.
Returns
DispatcherExtensions.SwitchToUiAwaitable An awaitable that switches to the dispatcher thread.