Mercurial > pub > ImplabNet
annotate Implab/IPromise.cs @ 51:2c332a9c64c0
Added methods for parameter checks
author | cin |
---|---|
date | Sat, 26 Apr 2014 23:36:00 +0400 |
parents | b255e4aeef17 |
children | 790e8a997d30 |
rev | line source |
---|---|
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 |
33
b255e4aeef17
removed the reference to the parent from the promise object this allows
cin
parents:
26
diff
changeset
|
11 new T Join(); |
b255e4aeef17
removed the reference to the parent from the promise object this allows
cin
parents:
26
diff
changeset
|
12 new T Join(int timeout); |
25 | 13 |
26 | 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); | |
33
b255e4aeef17
removed the reference to the parent from the promise object this allows
cin
parents:
26
diff
changeset
|
17 new IPromise<T> Error(ErrorHandler error); |
26 | 18 IPromise<T> Error(ErrorHandler<T> error); |
25 | 19 |
26 | 20 IPromise<T2> Map<T2>(ResultMapper<T,T2> mapper, ErrorHandler error); |
21 IPromise<T2> Map<T2>(ResultMapper<T, T2> mapper); | |
7 | 22 |
26 | 23 IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained, ErrorHandler error); |
24 IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained); | |
25 | |
33
b255e4aeef17
removed the reference to the parent from the promise object this allows
cin
parents:
26
diff
changeset
|
26 new IPromise<T> Cancelled(Action handler); |
b255e4aeef17
removed the reference to the parent from the promise object this allows
cin
parents:
26
diff
changeset
|
27 new IPromise<T> Finally(Action handler); |
b255e4aeef17
removed the reference to the parent from the promise object this allows
cin
parents:
26
diff
changeset
|
28 new IPromise<T> Anyway(Action handler); |
7 | 29 |
30 } | |
31 } |