Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Common/Auxiliary/DispatcherExtensions.cs @ 13792

Last change on this file since 13792 was 12503, checked in by aballeit, 9 years ago

#2283 added GUI and charts; fixed MCTS

File size: 894 bytes
RevLine 
[12503]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Threading;
6
7namespace 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.