annotate Implab/IPromiseT.cs @ 66:790e8a997d30

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