Mercurial > pub > ImplabNet
comparison Implab/IPromise.cs @ 7:7ea9363fef6c promises
inital progress handling
| author | cin |
|---|---|
| date | Fri, 01 Nov 2013 16:03:08 +0400 |
| parents | |
| children | c82e0dfbb4dd |
comparison
equal
deleted
inserted
replaced
| 6:dfa21d507bc5 | 7:7ea9363fef6c |
|---|---|
| 1 using System; | |
| 2 using System.Collections.Generic; | |
| 3 using System.Linq; | |
| 4 using System.Text; | |
| 5 | |
| 6 namespace Implab | |
| 7 { | |
| 8 public interface IPromise | |
| 9 { | |
| 10 /// <summary> | |
| 11 /// Check whereather the promise has no more than one dependent promise. | |
| 12 /// </summary> | |
| 13 bool IsExclusive | |
| 14 { | |
| 15 get; | |
| 16 } | |
| 17 | |
| 18 /// <summary> | |
| 19 /// The current state of the promise. | |
| 20 /// </summary> | |
| 21 PromiseState State | |
| 22 { | |
| 23 get; | |
| 24 } | |
| 25 | |
| 26 /// <summary> | |
| 27 /// Tries to cancel the promise or the complete chain. | |
| 28 /// </summary> | |
| 29 /// <param name="dependencies">Try to cancel the parent promise is it has the only one child</param> | |
| 30 /// <returns></returns> | |
| 31 bool Cancel(bool dependencies); | |
| 32 } | |
| 33 } |
