Rev | Line | |
---|
[12503] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
| 5 | using System.Windows.Threading;
|
---|
| 6 |
|
---|
| 7 | namespace Microsoft.Research.DynamicDataDisplay.Common.Auxiliary
|
---|
| 8 | {
|
---|
| 9 | public static class DispatcherExtensions
|
---|
| 10 | {
|
---|
| 11 | public static DispatcherOperation BeginInvoke(this Dispatcher dispatcher, Action action)
|
---|
| 12 | {
|
---|
| 13 | return dispatcher.BeginInvoke((Delegate)action);
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | public static DispatcherOperation BeginInvoke(this Dispatcher dispatcher, Action action, DispatcherPriority priority)
|
---|
| 17 | {
|
---|
| 18 | return dispatcher.BeginInvoke(action, priority);
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | public static void Invoke(this Dispatcher dispatcher, Action action, DispatcherPriority priority)
|
---|
| 22 | {
|
---|
| 23 | dispatcher.Invoke(action, priority);
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | public static void Wait(this DispatcherObject obj, DispatcherPriority priority)
|
---|
| 27 | {
|
---|
| 28 | obj.Dispatcher.BeginInvoke(() => { }, priority);
|
---|
| 29 | }
|
---|
| 30 | }
|
---|
| 31 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.