comparison Implab/IPromise.cs @ 33:b255e4aeef17

removed the reference to the parent from the promise object this allows resolved promises to release parents and results they are holding. Added complete set of operations to IPromiseBase interface Subscribing to the cancellation event of the promise should not affect it's IsExclusive property More tests.
author cin
date Thu, 10 Apr 2014 02:39:29 +0400
parents f0bf98e4d22c
children 790e8a997d30
comparison
equal deleted inserted replaced
32:8eca2652d2ff 33:b255e4aeef17
6 namespace Implab 6 namespace Implab
7 { 7 {
8 public interface IPromise<T>: IPromiseBase 8 public interface IPromise<T>: IPromiseBase
9 { 9 {
10 10
11 T Join(); 11 new T Join();
12 12 new T Join(int timeout);
13 T Join(int timeout);
14 13
15 IPromise<T> Then(ResultHandler<T> success, ErrorHandler error); 14 IPromise<T> Then(ResultHandler<T> success, ErrorHandler error);
16 IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error); 15 IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error);
17 IPromise<T> Then(ResultHandler<T> success); 16 IPromise<T> Then(ResultHandler<T> success);
18 IPromise<T> Error(ErrorHandler error); 17 new IPromise<T> Error(ErrorHandler error);
19 IPromise<T> Error(ErrorHandler<T> error); 18 IPromise<T> Error(ErrorHandler<T> error);
20 19
21 IPromise<T2> Map<T2>(ResultMapper<T,T2> mapper, ErrorHandler error); 20 IPromise<T2> Map<T2>(ResultMapper<T,T2> mapper, ErrorHandler error);
22 IPromise<T2> Map<T2>(ResultMapper<T, T2> mapper); 21 IPromise<T2> Map<T2>(ResultMapper<T, T2> mapper);
23 22
24 IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained, ErrorHandler error); 23 IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained, ErrorHandler error);
25 IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained); 24 IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained);
26 25
27 IPromise<T> Cancelled(Action handler); 26 new IPromise<T> Cancelled(Action handler);
28 IPromise<T> Finally(Action handler); 27 new IPromise<T> Finally(Action handler);
29 IPromise<T> Anyway(Action handler); 28 new IPromise<T> Anyway(Action handler);
30 29
31 } 30 }
32 } 31 }