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<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error, Action cancel);
|
76
|
17
|
101
|
18 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error);
|
76
|
19
|
101
|
20 IPromise<T2> Then<T2>(Func<T, T2> mapper);
|
76
|
21
|
101
|
22 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error, Action cancel);
|
76
|
23
|
101
|
24 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error);
|
76
|
25
|
101
|
26 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained);
|
75
|
27
|
101
|
28 IPromise<T> Error(Func<Exception,T> error);
|
66
|
29
|
|
30 new IPromise<T> Cancelled(Action handler);
|
75
|
31
|
76
|
32 new IPromise<T> Anyway(Action handler);
|
66
|
33 }
|
|
34 }
|