~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/monomac/src/AppKit/AppKitSynchronizationContext.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// AppKitSynchronizationContext.cs: Default SynchronizationContext for the main UI thread
 
3
//
 
4
using System.Threading;
 
5
 
 
6
using MonoMac.Foundation;
 
7
 
 
8
namespace MonoMac.AppKit {
 
9
        class AppKitSynchronizationContext : SynchronizationContext {
 
10
                public override SynchronizationContext CreateCopy ()
 
11
                {
 
12
                        return new AppKitSynchronizationContext ();
 
13
                }
 
14
 
 
15
                public override void Post (SendOrPostCallback d, object state)
 
16
                {
 
17
                        NSRunLoop.Main.BeginInvokeOnMainThread (() => d (state));
 
18
                }
 
19
 
 
20
                public override void Send (SendOrPostCallback d, object state)
 
21
                {
 
22
                        NSRunLoop.Main.InvokeOnMainThread (() => d (state));
 
23
                }
 
24
        }
 
25
}
 
 
b'\\ No newline at end of file'