Mercurial > pub > ImplabNet
comparison Implab/IPromiseT.cs @ 192:f1da3afc3521 release v2.1
Слияние с v2
author | cin |
---|---|
date | Fri, 22 Apr 2016 13:10:34 +0300 |
parents | 8c0b95069066 |
children | cbe10ac0731e |
comparison
equal
deleted
inserted
replaced
71:1714fd8678ef | 192:f1da3afc3521 |
---|---|
1 using System; | 1 using System; |
2 using System.Collections.Generic; | |
3 using System.Linq; | |
4 using System.Text; | |
5 | 2 |
6 namespace Implab | 3 namespace Implab { |
7 { | 4 public interface IPromise<out T> : IPromise { |
8 public interface IPromise<T>: IPromise | 5 |
9 { | 6 IPromise<T> On(Action<T> success, Action<Exception> error, Action<Exception> cancel); |
7 | |
8 IPromise<T> On(Action<T> success, Action<Exception> error); | |
9 | |
10 IPromise<T> On(Action<T> success); | |
10 | 11 |
11 new T Join(); | 12 new T Join(); |
13 | |
12 new T Join(int timeout); | 14 new T Join(int timeout); |
13 | 15 |
14 IPromise<T> Then(ResultHandler<T> success, ErrorHandler error); | 16 new IPromise<T> On(Action success, Action<Exception> error, Action<Exception> cancel); |
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 | 17 |
20 IPromise<T2> Map<T2>(ResultMapper<T,T2> mapper, ErrorHandler error); | 18 new IPromise<T> On(Action success, Action<Exception> error); |
21 IPromise<T2> Map<T2>(ResultMapper<T, T2> mapper); | |
22 | 19 |
23 IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained, ErrorHandler error); | 20 new IPromise<T> On(Action success); |
24 IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained); | |
25 | 21 |
26 new IPromise<T> Cancelled(Action handler); | 22 new IPromise<T> On(Action handler, PromiseEventType events); |
27 new IPromise<T> Finally(Action handler); | |
28 new IPromise<T> Anyway(Action handler); | |
29 | 23 |
30 } | 24 } |
31 } | 25 } |