annotate Implab/IPromiseBase.cs @ 29:768f7deeb55b

Added a casting method for promises.
author cin
date Thu, 06 Mar 2014 17:59:03 +0400
parents f0bf98e4d22c
children b255e4aeef17
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25
9bf5b23650c9 refactoring
cin
parents:
diff changeset
1 using System;
9bf5b23650c9 refactoring
cin
parents:
diff changeset
2 using System.Collections.Generic;
9bf5b23650c9 refactoring
cin
parents:
diff changeset
3 using System.Linq;
9bf5b23650c9 refactoring
cin
parents:
diff changeset
4 using System.Text;
9bf5b23650c9 refactoring
cin
parents:
diff changeset
5
9bf5b23650c9 refactoring
cin
parents:
diff changeset
6 namespace Implab {
9bf5b23650c9 refactoring
cin
parents:
diff changeset
7 public interface IPromiseBase: ICancellable {
9bf5b23650c9 refactoring
cin
parents:
diff changeset
8 /// <summary>
9bf5b23650c9 refactoring
cin
parents:
diff changeset
9 /// Check whereather the promise has no more than one dependent promise.
9bf5b23650c9 refactoring
cin
parents:
diff changeset
10 /// </summary>
9bf5b23650c9 refactoring
cin
parents:
diff changeset
11 bool IsExclusive {
9bf5b23650c9 refactoring
cin
parents:
diff changeset
12 get;
9bf5b23650c9 refactoring
cin
parents:
diff changeset
13 }
9bf5b23650c9 refactoring
cin
parents:
diff changeset
14
29
768f7deeb55b Added a casting method for promises.
cin
parents: 26
diff changeset
15 /// <summary>
768f7deeb55b Added a casting method for promises.
cin
parents: 26
diff changeset
16 /// Тип результата, получаемого через данное обещание.
768f7deeb55b Added a casting method for promises.
cin
parents: 26
diff changeset
17 /// </summary>
768f7deeb55b Added a casting method for promises.
cin
parents: 26
diff changeset
18 Type PromiseType { get; }
768f7deeb55b Added a casting method for promises.
cin
parents: 26
diff changeset
19
25
9bf5b23650c9 refactoring
cin
parents:
diff changeset
20 bool IsResolved { get; }
9bf5b23650c9 refactoring
cin
parents:
diff changeset
21
9bf5b23650c9 refactoring
cin
parents:
diff changeset
22 bool IsCancelled { get; }
26
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
23
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
24 IPromiseBase Then(Action success,ErrorHandler error);
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
25 IPromiseBase Then(Action success);
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
26
29
768f7deeb55b Added a casting method for promises.
cin
parents: 26
diff changeset
27 IPromise<T> Cast<T>();
768f7deeb55b Added a casting method for promises.
cin
parents: 26
diff changeset
28
25
9bf5b23650c9 refactoring
cin
parents:
diff changeset
29 }
9bf5b23650c9 refactoring
cin
parents:
diff changeset
30 }