7
|
1 using System;
|
|
2 using System.Collections.Generic;
|
|
3 using System.Linq;
|
|
4 using System.Text;
|
|
5
|
66
|
6 namespace Implab {
|
|
7 public interface IPromise: ICancellable {
|
|
8 /// <summary>
|
|
9 /// Check whereather the promise has no more than one dependent promise.
|
|
10 /// </summary>
|
|
11 bool IsExclusive {
|
|
12 get;
|
|
13 }
|
26
|
14
|
66
|
15 /// <summary>
|
|
16 /// Тип результата, получаемого через данное обещание.
|
|
17 /// </summary>
|
|
18 Type PromiseType { get; }
|
25
|
19
|
66
|
20 bool IsResolved { get; }
|
|
21
|
|
22 bool IsCancelled { get; }
|
25
|
23
|
66
|
24 IPromise Then(Action success,ErrorHandler error);
|
|
25 IPromise Then(Action success);
|
|
26 IPromise Error(ErrorHandler error);
|
|
27 IPromise Anyway(Action handler);
|
|
28 IPromise Finally(Action handler);
|
|
29 IPromise Cancelled(Action handler);
|
7
|
30
|
66
|
31 IPromise<T> Cast<T>();
|
26
|
32
|
66
|
33 void Join();
|
|
34 void Join(int timeout);
|
7
|
35
|
|
36 }
|
|
37 }
|