Mercurial > pub > ImplabNet
diff Implab/IPromiseT.cs @ 192:f1da3afc3521 release v2.1
Слияние с v2
author | cin |
---|---|
date | Fri, 22 Apr 2016 13:10:34 +0300 |
parents | 8c0b95069066 |
children | cbe10ac0731e |
line wrap: on
line diff
--- a/Implab/IPromiseT.cs Wed Sep 03 18:34:02 2014 +0400 +++ b/Implab/IPromiseT.cs Fri Apr 22 13:10:34 2016 +0300 @@ -1,31 +1,25 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; + +namespace Implab { + public interface IPromise<out T> : IPromise { -namespace Implab -{ - public interface IPromise<T>: IPromise - { + IPromise<T> On(Action<T> success, Action<Exception> error, Action<Exception> cancel); + + IPromise<T> On(Action<T> success, Action<Exception> error); + + IPromise<T> On(Action<T> success); new T Join(); + new 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); - new IPromise<T> Error(ErrorHandler error); - IPromise<T> Error(ErrorHandler<T> error); + new IPromise<T> On(Action success, Action<Exception> error, Action<Exception> cancel); + + new IPromise<T> On(Action success, Action<Exception> error); - IPromise<T2> Map<T2>(ResultMapper<T,T2> mapper, ErrorHandler error); - IPromise<T2> Map<T2>(ResultMapper<T, T2> mapper); + new IPromise<T> On(Action success); - IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained, ErrorHandler error); - IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained); - - new IPromise<T> Cancelled(Action handler); - new IPromise<T> Finally(Action handler); - new IPromise<T> Anyway(Action handler); + new IPromise<T> On(Action handler, PromiseEventType events); } }