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