66
|
1 using System;
|
|
2
|
75
|
3 namespace Implab {
|
76
|
4 public interface IPromise<T> : IPromise {
|
66
|
5
|
|
6 new T Join();
|
75
|
7
|
66
|
8 new T Join(int timeout);
|
|
9
|
104
|
10 void On(Action<T> success, Action<Exception> error, Action cancel);
|
76
|
11
|
104
|
12 void On(Action<T> success, Action<Exception> error);
|
76
|
13
|
104
|
14 void On(Action<T> success);
|
76
|
15
|
101
|
16 IPromise<T> Then(Action<T> success, Func<Exception,T> error, Action cancel);
|
75
|
17
|
101
|
18 IPromise<T> Then(Action<T> success, Func<Exception,T> error);
|
75
|
19
|
101
|
20 IPromise<T> Then(Action<T> success);
|
75
|
21
|
101
|
22 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error, Action cancel);
|
76
|
23
|
101
|
24 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error);
|
76
|
25
|
101
|
26 IPromise<T2> Then<T2>(Func<T, T2> mapper);
|
76
|
27
|
101
|
28 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error, Action cancel);
|
76
|
29
|
101
|
30 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error);
|
76
|
31
|
101
|
32 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained);
|
75
|
33
|
101
|
34 IPromise<T> Error(Func<Exception,T> error);
|
66
|
35
|
|
36 new IPromise<T> Cancelled(Action handler);
|
75
|
37
|
76
|
38 new IPromise<T> Anyway(Action handler);
|
66
|
39 }
|
|
40 }
|