comparison Implab/SyncContextPromise.cs @ 101:279e226dffdd v2

code cleanup added EnsureDispatched extension
author cin
date Thu, 06 Nov 2014 20:03:19 +0300
parents d67b95eddaf4
children d4e38929ce36
comparison
equal deleted inserted replaced
100:673947ce458a 101:279e226dffdd
7 public SyncContextPromise(SynchronizationContext context) { 7 public SyncContextPromise(SynchronizationContext context) {
8 Safe.ArgumentNotNull(context, "context"); 8 Safe.ArgumentNotNull(context, "context");
9 m_context = context; 9 m_context = context;
10 } 10 }
11 11
12 public SyncContextPromise(SynchronizationContext context, IPromise parent, bool cancellable) 12 public SyncContextPromise(SynchronizationContext context, IPromise parent)
13 : base(parent, cancellable) { 13 : base(parent) {
14 Safe.ArgumentNotNull(context, "context"); 14 Safe.ArgumentNotNull(context, "context");
15 m_context = context; 15 m_context = context;
16 } 16 }
17 protected override void InvokeHandler(HandlerDescriptor handler) { 17 protected override void InvokeHandler(HandlerDescriptor handler) {
18 m_context.Post(x => base.InvokeHandler(handler),null); 18 m_context.Post(x => base.InvokeHandler(handler),null);