annotate Implab/IPromise.cs @ 26:f0bf98e4d22c

refactoring
author cin
date Fri, 21 Feb 2014 03:15:28 +0400
parents 9bf5b23650c9
children b255e4aeef17
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
1 using System;
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
2 using System.Collections.Generic;
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
3 using System.Linq;
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
4 using System.Text;
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
5
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
6 namespace Implab
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
7 {
25
9bf5b23650c9 refactoring
cin
parents: 19
diff changeset
8 public interface IPromise<T>: IPromiseBase
7
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
9 {
26
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
10
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
11 T Join();
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
12
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
13 T Join(int timeout);
25
9bf5b23650c9 refactoring
cin
parents: 19
diff changeset
14
26
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
15 IPromise<T> Then(ResultHandler<T> success, ErrorHandler error);
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
16 IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error);
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
17 IPromise<T> Then(ResultHandler<T> success);
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
18 IPromise<T> Error(ErrorHandler error);
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
19 IPromise<T> Error(ErrorHandler<T> error);
25
9bf5b23650c9 refactoring
cin
parents: 19
diff changeset
20
26
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
21 IPromise<T2> Map<T2>(ResultMapper<T,T2> mapper, ErrorHandler error);
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
22 IPromise<T2> Map<T2>(ResultMapper<T, T2> mapper);
7
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
23
26
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
24 IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained, ErrorHandler error);
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
25 IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained);
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
26
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
27 IPromise<T> Cancelled(Action handler);
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
28 IPromise<T> Finally(Action handler);
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
29 IPromise<T> Anyway(Action handler);
7
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
30
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
31 }
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
32 }