diff Implab/IPromise.cs @ 26:f0bf98e4d22c

refactoring
author cin
date Fri, 21 Feb 2014 03:15:28 +0400
parents 9bf5b23650c9
children b255e4aeef17
line wrap: on
line diff
--- a/Implab/IPromise.cs	Thu Feb 06 01:08:59 2014 +0400
+++ b/Implab/IPromise.cs	Fri Feb 21 03:15:28 2014 +0400
@@ -7,10 +7,26 @@
 {
     public interface IPromise<T>: IPromiseBase
     {
-        
+
+        T Join();
+
+        T Join(int timeout);
 
+        IPromise<T> Then(ResultHandler<T> success, ErrorHandler error);
+        IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error);
+        IPromise<T> Then(ResultHandler<T> success);
+        IPromise<T> Error(ErrorHandler error);
+        IPromise<T> Error(ErrorHandler<T> error);
 
+        IPromise<T2> Map<T2>(ResultMapper<T,T2> mapper, ErrorHandler error);
+        IPromise<T2> Map<T2>(ResultMapper<T, T2> mapper);
 
+        IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained, ErrorHandler error);
+        IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained);
+
+        IPromise<T> Cancelled(Action handler);
+        IPromise<T> Finally(Action handler);
+        IPromise<T> Anyway(Action handler);
 
     }
 }