66
|
1 using System;
|
|
2 using System.Collections.Generic;
|
|
3 using System.Linq;
|
|
4 using System.Text;
|
|
5
|
75
|
6 namespace Implab {
|
|
7 public interface IPromise<T>: IPromise {
|
66
|
8
|
|
9 new T Join();
|
75
|
10
|
66
|
11 new T Join(int timeout);
|
|
12
|
75
|
13 IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error, Action cancel);
|
|
14
|
66
|
15 IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error);
|
75
|
16
|
66
|
17 IPromise<T> Then(ResultHandler<T> success);
|
75
|
18
|
|
19 void Last(ResultHandler<T> success, ErrorHandler error, Action cancel);
|
|
20 void Last(ResultHandler<T> success, ErrorHandler error);
|
|
21 void Last(ResultHandler<T> success);
|
|
22
|
66
|
23 IPromise<T> Error(ErrorHandler<T> error);
|
|
24
|
75
|
25 IPromise<T2> Then<T2>(ResultMapper<T,T2> mapper, ErrorHandler<T> error);
|
|
26
|
|
27 IPromise<T2> Then<T2>(ResultMapper<T,T2> mapper);
|
66
|
28
|
75
|
29 IPromise<T2> Then<T2>(ChainedOperation<T, T2> chained, ErrorHandler<T> error);
|
|
30
|
|
31 IPromise<T2> Then<T2>(ChainedOperation<T, T2> chained);
|
66
|
32
|
|
33 new IPromise<T> Cancelled(Action handler);
|
75
|
34
|
66
|
35 new IPromise<T> Finally(Action handler);
|
|
36 }
|
|
37 }
|