using System; namespace Implab { public interface IPromise : IPromise { new T Join(); new T Join(int timeout); void Last(ResultHandler success, ErrorHandler error, Action cancel); void Last(ResultHandler success, ErrorHandler error); void Last(ResultHandler success); IPromise Then(ResultHandler success, ErrorHandler error, Action cancel); IPromise Then(ResultHandler success, ErrorHandler error); IPromise Then(ResultHandler success); IPromise Then(ResultMapper mapper, ErrorHandler error, Action cancel); IPromise Then(ResultMapper mapper, ErrorHandler error); IPromise Then(ResultMapper mapper); IPromise Chain(ResultMapper> chained, ErrorHandler> error, Action cancel); IPromise Chain(ResultMapper> chained, ErrorHandler> error); IPromise Chain(ResultMapper> chained); IPromise Error(ErrorHandler error); new IPromise Cancelled(Action handler); new IPromise Anyway(Action handler); } }