comparison Implab/Promise.cs @ 74:c4140283575c v2

minor fixes
author cin
date Mon, 08 Sep 2014 17:40:46 +0400
parents d67b95eddaf4
children 4439140706d0
comparison
equal deleted inserted replaced
73:3b8393be3441 74:c4140283575c
445 public IPromise<TNew> Chain<TNew>(ChainedOperation<T, TNew> chained) { 445 public IPromise<TNew> Chain<TNew>(ChainedOperation<T, TNew> chained) {
446 return Chain(chained, null); 446 return Chain(chained, null);
447 } 447 }
448 448
449 public IPromise<T> Cancelled(Action handler) { 449 public IPromise<T> Cancelled(Action handler) {
450 AddHandler(null, null, handler, null); 450 var medium = new Promise<T>(this, true);
451 return this; 451 AddHandler(null, null, handler, medium);
452 return medium;
452 } 453 }
453 454
454 /// <summary> 455 /// <summary>
455 /// Adds the specified handler for all cases (success, error, cancel) 456 /// Adds the specified handler for all cases (success, error, cancel)
456 /// </summary> 457 /// </summary>