2 using System
.Collections
.Generic
;
4 using System
.Windows
.Threading
;
7 delegate void Action ();
11 Dispatcher d
= Dispatcher
.CurrentDispatcher
;
14 d
.Invoke (DispatcherPriority
.Normal
, new Action (mine
));
15 Console
.WriteLine ("Task");
18 d
.BeginInvoke (DispatcherPriority
.Normal
, (Action
) delegate {
19 Console
.WriteLine ("First");
21 d
.BeginInvoke (DispatcherPriority
.Normal
, (Action
) delegate {
22 Console
.WriteLine ("Second");
25 d
.BeginInvoke (DispatcherPriority
.Send
, (Action
) delegate {
26 Console
.WriteLine ("High Priority");
27 d
.BeginInvoke (DispatcherPriority
.Send
, (Action
) delegate {
28 Console
.WriteLine ("INSERTED");
31 d
.BeginInvoke (DispatcherPriority
.SystemIdle
, (Action
) delegate {
32 Console
.WriteLine ("Idle");
40 Console
.WriteLine ("Mine");