Mercurial > pub > ImplabNet
diff Implab/IPromiseT.cs @ 138:f75cfa58e3d4 v2
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
author | cin |
---|---|
date | Tue, 17 Feb 2015 18:16:26 +0300 |
parents | 2573b562e328 |
children | 8c0b95069066 |
line wrap: on
line diff
--- a/Implab/IPromiseT.cs Mon Feb 16 17:48:39 2015 +0300 +++ b/Implab/IPromiseT.cs Tue Feb 17 18:16:26 2015 +0300 @@ -7,7 +7,7 @@ new T Join(int timeout); - IPromise<T> On(Action<T> success, Action<Exception> error, Action cancel); + IPromise<T> On(Action<T> success, Action<Exception> error, Action<Exception> cancel); IPromise<T> On(Action<T> success, Action<Exception> error); @@ -15,20 +15,16 @@ new IPromise<T> On(Action handler, PromiseEventType events); - IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error, Func<T2> cancel); + IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception, T2> error, Func<Exception, T2> cancel); - IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error); + IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception, T2> error); IPromise<T2> Then<T2>(Func<T, T2> mapper); - IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error, Func<IPromise<T2>> cancel); + IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception, IPromise<T2>> error, Func<Exception, IPromise<T2>> cancel); - IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error); + IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception, IPromise<T2>> error); IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained); - - IPromise<T2> Error<T2>(Func<Exception,T2> error); - - IPromise<T2> Cancelled<T2>(Func<T2> handler); } }