##// END OF EJS Templates
minor fixes and improvements of AsyncQueue, additional tests
minor fixes and improvements of AsyncQueue, additional tests

File last commit:

r119:2573b562e328 v2
r122:0c8685c8b56b v2
Show More
IPromiseT.cs
34 lines | 1.1 KiB | text/x-csharp | CSharpLexer
using System;
namespace Implab {
public interface IPromise<out T> : IPromise {
new T Join();
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);
IPromise<T> On(Action<T> success);
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);
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);
IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained);
IPromise<T2> Error<T2>(Func<Exception,T2> error);
IPromise<T2> Cancelled<T2>(Func<T2> handler);
}
}