Mercurial > pub > ImplabNet
diff Implab/IPromise.cs @ 7:7ea9363fef6c promises
inital progress handling
author | cin |
---|---|
date | Fri, 01 Nov 2013 16:03:08 +0400 |
parents | |
children | c82e0dfbb4dd |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Implab/IPromise.cs Fri Nov 01 16:03:08 2013 +0400 @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Implab +{ + public interface IPromise + { + /// <summary> + /// Check whereather the promise has no more than one dependent promise. + /// </summary> + bool IsExclusive + { + get; + } + + /// <summary> + /// The current state of the promise. + /// </summary> + PromiseState State + { + get; + } + + /// <summary> + /// Tries to cancel the promise or the complete chain. + /// </summary> + /// <param name="dependencies">Try to cancel the parent promise is it has the only one child</param> + /// <returns></returns> + bool Cancel(bool dependencies); + } +}