comparison Implab/IPromiseT.cs @ 138:f75cfa58e3d4 v2

added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
author cin
date Tue, 17 Feb 2015 18:16:26 +0300
parents 2573b562e328
children 8c0b95069066
comparison
equal deleted inserted replaced
137:238e15580926 138:f75cfa58e3d4
5 5
6 new T Join(); 6 new T Join();
7 7
8 new T Join(int timeout); 8 new T Join(int timeout);
9 9
10 IPromise<T> On(Action<T> success, Action<Exception> error, Action cancel); 10 IPromise<T> On(Action<T> success, Action<Exception> error, Action<Exception> cancel);
11 11
12 IPromise<T> On(Action<T> success, Action<Exception> error); 12 IPromise<T> On(Action<T> success, Action<Exception> error);
13 13
14 IPromise<T> On(Action<T> success); 14 IPromise<T> On(Action<T> success);
15 15
16 new IPromise<T> On(Action handler, PromiseEventType events); 16 new IPromise<T> On(Action handler, PromiseEventType events);
17 17
18 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error, Func<T2> cancel); 18 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception, T2> error, Func<Exception, T2> cancel);
19 19
20 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error); 20 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception, T2> error);
21 21
22 IPromise<T2> Then<T2>(Func<T, T2> mapper); 22 IPromise<T2> Then<T2>(Func<T, T2> mapper);
23 23
24 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error, Func<IPromise<T2>> cancel); 24 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception, IPromise<T2>> error, Func<Exception, IPromise<T2>> cancel);
25 25
26 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error); 26 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception, IPromise<T2>> error);
27 27
28 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained); 28 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained);
29
30 IPromise<T2> Error<T2>(Func<Exception,T2> error);
31
32 IPromise<T2> Cancelled<T2>(Func<T2> handler);
33 } 29 }
34 } 30 }