Mercurial > pub > ImplabNet
diff Implab/IPromiseT.cs @ 75:4439140706d0 v2
major refactoring, added tasks support
author | cin |
---|---|
date | Wed, 10 Sep 2014 11:17:37 +0400 |
parents | d67b95eddaf4 |
children | c761fc982e1d |
line wrap: on
line diff
--- a/Implab/IPromiseT.cs Mon Sep 08 17:40:46 2014 +0400 +++ b/Implab/IPromiseT.cs Wed Sep 10 11:17:37 2014 +0400 @@ -3,27 +3,35 @@ using System.Linq; using System.Text; -namespace Implab -{ - public interface IPromise<T>: IPromise - { +namespace Implab { + public interface IPromise<T>: IPromise { new T Join(); + new T Join(int timeout); + IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error, Action cancel); + IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error); + IPromise<T> Then(ResultHandler<T> success); + + void Last(ResultHandler<T> success, ErrorHandler error, Action cancel); + void Last(ResultHandler<T> success, ErrorHandler error); + void Last(ResultHandler<T> success); + IPromise<T> Error(ErrorHandler<T> error); - IPromise<T2> Map<T2>(ResultMapper<T,T2> mapper, ErrorHandler<T> error); - IPromise<T2> Map<T2>(ResultMapper<T, T2> mapper); + IPromise<T2> Then<T2>(ResultMapper<T,T2> mapper, ErrorHandler<T> error); + + IPromise<T2> Then<T2>(ResultMapper<T,T2> mapper); - IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained, ErrorHandler<T> error); - IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained); + IPromise<T2> Then<T2>(ChainedOperation<T, T2> chained, ErrorHandler<T> error); + + IPromise<T2> Then<T2>(ChainedOperation<T, T2> chained); new IPromise<T> Cancelled(Action handler); + new IPromise<T> Finally(Action handler); - new IPromise<T> Anyway(Action handler); - } }