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