comparison Implab/IPromiseT.cs @ 144:8c0b95069066 v2

DRAFT: refactoring
author cin
date Fri, 06 Mar 2015 15:45:26 +0300
parents f75cfa58e3d4
children cbe10ac0731e
comparison
equal deleted inserted replaced
143:16f926ee499d 144:8c0b95069066
1 using System; 1 using System;
2 2
3 namespace Implab { 3 namespace Implab {
4 public interface IPromise<out T> : IPromise { 4 public interface IPromise<out T> : IPromise {
5
6 new T Join();
7
8 new T Join(int timeout);
9 5
10 IPromise<T> On(Action<T> success, Action<Exception> error, Action<Exception> cancel); 6 IPromise<T> On(Action<T> success, Action<Exception> error, Action<Exception> cancel);
11 7
12 IPromise<T> On(Action<T> success, Action<Exception> error); 8 IPromise<T> On(Action<T> success, Action<Exception> error);
13 9
14 IPromise<T> On(Action<T> success); 10 IPromise<T> On(Action<T> success);
15 11
12 new T Join();
13
14 new T Join(int timeout);
15
16 new IPromise<T> On(Action success, Action<Exception> error, Action<Exception> cancel);
17
18 new IPromise<T> On(Action success, Action<Exception> error);
19
20 new IPromise<T> On(Action success);
21
16 new IPromise<T> On(Action handler, PromiseEventType events); 22 new IPromise<T> On(Action handler, PromiseEventType events);
17 23
18 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception, T2> error, Func<Exception, T2> cancel);
19
20 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception, T2> error);
21
22 IPromise<T2> Then<T2>(Func<T, T2> mapper);
23
24 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception, IPromise<T2>> error, Func<Exception, IPromise<T2>> cancel);
25
26 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception, IPromise<T2>> error);
27
28 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained);
29 } 24 }
30 } 25 }