Mercurial > pub > ImplabNet
comparison Implab.Fx/PromiseHelpers.cs @ 119:2573b562e328 v2
Promises rewritten, added improved version of AsyncQueue
| author | cin |
|---|---|
| date | Sun, 11 Jan 2015 19:13:02 +0300 |
| parents | 5f10d54b45df |
| children |
comparison
equal
deleted
inserted
replaced
| 118:e046a94eecb1 | 119:2573b562e328 |
|---|---|
| 25 public static IPromise<T> DispatchToControl<T>(this IPromise<T> that, Control ctl) | 25 public static IPromise<T> DispatchToControl<T>(this IPromise<T> that, Control ctl) |
| 26 { | 26 { |
| 27 Safe.ArgumentNotNull(that, "that"); | 27 Safe.ArgumentNotNull(that, "that"); |
| 28 Safe.ArgumentNotNull(ctl, "ctl"); | 28 Safe.ArgumentNotNull(ctl, "ctl"); |
| 29 | 29 |
| 30 var directed = new ControlBoundPromise<T>(ctl,that); | 30 var directed = new ControlBoundPromise<T>(ctl); |
| 31 | |
| 32 directed.On(that.Cancel, PromiseEventType.Cancelled); | |
| 31 | 33 |
| 32 that.On( | 34 that.On( |
| 33 directed.Resolve, | 35 directed.Resolve, |
| 34 directed.Reject, | 36 directed.Reject, |
| 35 directed.Cancel | 37 directed.Cancel |
