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

code cleanup added EnsureDispatched extension
author cin
date Thu, 06 Nov 2014 20:03:19 +0300
parents a43745f81f10
children 5f10d54b45df
comparison
equal deleted inserted replaced
100:673947ce458a 101:279e226dffdd
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 void Last(ResultHandler<T> success, ErrorHandler error, Action cancel); 10 void Last(Action<T> success, Action<Exception> error, Action cancel);
11 11
12 void Last(ResultHandler<T> success, ErrorHandler error); 12 void Last(Action<T> success, Action<Exception> error);
13 13
14 void Last(ResultHandler<T> success); 14 void Last(Action<T> success);
15 15
16 IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error, Action cancel); 16 IPromise<T> Then(Action<T> success, Func<Exception,T> error, Action cancel);
17 17
18 IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error); 18 IPromise<T> Then(Action<T> success, Func<Exception,T> error);
19 19
20 IPromise<T> Then(ResultHandler<T> success); 20 IPromise<T> Then(Action<T> success);
21 21
22 IPromise<T2> Then<T2>(ResultMapper<T, T2> mapper, ErrorHandler<T2> error, Action cancel); 22 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error, Action cancel);
23 23
24 IPromise<T2> Then<T2>(ResultMapper<T, T2> mapper, ErrorHandler<T2> error); 24 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error);
25 25
26 IPromise<T2> Then<T2>(ResultMapper<T, T2> mapper); 26 IPromise<T2> Then<T2>(Func<T, T2> mapper);
27 27
28 IPromise<T2> Chain<T2>(ResultMapper<T, IPromise<T2>> chained, ErrorHandler<IPromise<T2>> error, Action cancel); 28 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error, Action cancel);
29 29
30 IPromise<T2> Chain<T2>(ResultMapper<T, IPromise<T2>> chained, ErrorHandler<IPromise<T2>> error); 30 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error);
31 31
32 IPromise<T2> Chain<T2>(ResultMapper<T, IPromise<T2>> chained); 32 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained);
33 33
34 IPromise<T> Error(ErrorHandler<T> error); 34 IPromise<T> Error(Func<Exception,T> error);
35 35
36 new IPromise<T> Cancelled(Action handler); 36 new IPromise<T> Cancelled(Action handler);
37 37
38 new IPromise<T> Anyway(Action handler); 38 new IPromise<T> Anyway(Action handler);
39 } 39 }