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<T> error);
|
|
15 IPromise<T> Then(ResultHandler<T> success);
|
|
16 IPromise<T> Error(ErrorHandler<T> error);
|
|
17
|
72
|
18 IPromise<T2> Map<T2>(ResultMapper<T,T2> mapper, ErrorHandler<T> error);
|
66
|
19 IPromise<T2> Map<T2>(ResultMapper<T, T2> mapper);
|
|
20
|
72
|
21 IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained, ErrorHandler<T> error);
|
66
|
22 IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained);
|
|
23
|
|
24 new IPromise<T> Cancelled(Action handler);
|
|
25 new IPromise<T> Finally(Action handler);
|
|
26 new IPromise<T> Anyway(Action handler);
|
|
27
|
|
28 }
|
|
29 }
|