using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Implab {
public interface IPromise: ICancellable {
///
/// Check whereather the promise has no more than one dependent promise.
///
bool IsExclusive {
get;
}
///
/// Тип результата, получаемого через данное обещание.
///
Type PromiseType { get; }
bool IsResolved { get; }
bool IsCancelled { get; }
IPromise Then(Action success,ErrorHandler error);
IPromise Then(Action success);
IPromise Error(ErrorHandler error);
IPromise Anyway(Action handler);
IPromise Finally(Action handler);
IPromise Cancelled(Action handler);
IPromise Cast();
void Join();
void Join(int timeout);
}
}