diff Implab/IPromiseT.cs @ 101:279e226dffdd v2

code cleanup added EnsureDispatched extension
author cin
date Thu, 06 Nov 2014 20:03:19 +0300
parents a43745f81f10
children 5f10d54b45df
line wrap: on
line diff
--- a/Implab/IPromiseT.cs	Wed Nov 05 16:39:56 2014 +0300
+++ b/Implab/IPromiseT.cs	Thu Nov 06 20:03:19 2014 +0300
@@ -7,31 +7,31 @@
 
         new T Join(int timeout);
 
-        void Last(ResultHandler<T> success, ErrorHandler error, Action cancel);
+        void Last(Action<T> success, Action<Exception> error, Action cancel);
         
-        void Last(ResultHandler<T> success, ErrorHandler error);
+        void Last(Action<T> success, Action<Exception> error);
 
-        void Last(ResultHandler<T> success);
+        void Last(Action<T> success);
 
-        IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error, Action cancel);
+        IPromise<T> Then(Action<T> success, Func<Exception,T> error, Action cancel);
 
-        IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error);
+        IPromise<T> Then(Action<T> success, Func<Exception,T> error);
 
-        IPromise<T> Then(ResultHandler<T> success);
+        IPromise<T> Then(Action<T> success);
 
-        IPromise<T2> Then<T2>(ResultMapper<T, T2> mapper, ErrorHandler<T2> error, Action cancel);
+        IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error, Action cancel);
 
-        IPromise<T2> Then<T2>(ResultMapper<T, T2> mapper, ErrorHandler<T2> error);
+        IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error);
 
-        IPromise<T2> Then<T2>(ResultMapper<T, T2> mapper);
+        IPromise<T2> Then<T2>(Func<T, T2> mapper);
 
-        IPromise<T2> Chain<T2>(ResultMapper<T, IPromise<T2>> chained, ErrorHandler<IPromise<T2>> error, Action cancel);
+        IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error, Action cancel);
 
-        IPromise<T2> Chain<T2>(ResultMapper<T, IPromise<T2>> chained, ErrorHandler<IPromise<T2>> error);
+        IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error);
 
-        IPromise<T2> Chain<T2>(ResultMapper<T, IPromise<T2>> chained);
+        IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained);
 
-        IPromise<T> Error(ErrorHandler<T> error);
+        IPromise<T> Error(Func<Exception,T> error);
 
         new IPromise<T> Cancelled(Action handler);