annotate Implab/IPromise.cs @ 73:3b8393be3441 v2

fixed tests
author cin
date Fri, 05 Sep 2014 00:27:14 +0400
parents 790e8a997d30
children c4140283575c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
1 using System;
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
2 using System.Collections.Generic;
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
3 using System.Linq;
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
4 using System.Text;
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
5
66
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
6 namespace Implab {
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
7 public interface IPromise: ICancellable {
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
8 /// <summary>
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
9 /// Check whereather the promise has no more than one dependent promise.
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
10 /// </summary>
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
11 bool IsExclusive {
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
12 get;
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
13 }
26
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
14
66
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
15 /// <summary>
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
16 /// Тип результата, получаемого через данное обещание.
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
17 /// </summary>
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
18 Type PromiseType { get; }
25
9bf5b23650c9 refactoring
cin
parents: 19
diff changeset
19
66
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
20 bool IsResolved { get; }
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
21
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
22 bool IsCancelled { get; }
25
9bf5b23650c9 refactoring
cin
parents: 19
diff changeset
23
66
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
24 IPromise Then(Action success,ErrorHandler error);
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
25 IPromise Then(Action success);
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
26 IPromise Error(ErrorHandler error);
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
27 IPromise Anyway(Action handler);
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
28 IPromise Finally(Action handler);
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
29 IPromise Cancelled(Action handler);
7
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
30
66
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
31 IPromise<T> Cast<T>();
26
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
32
66
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
33 void Join();
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
34 void Join(int timeout);
7
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
35
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
36 }
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
37 }