view Implab/IPromiseT.cs @ 141:0fa293bb1351 v2

fixed JSON writer
author cin
date Tue, 24 Feb 2015 00:54:22 +0300
parents f75cfa58e3d4
children 8c0b95069066
line wrap: on
line source

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<Exception> 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<Exception, 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<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);
    }
}