Mercurial > pub > ImplabNet
diff Implab/IPromise.cs @ 151:ec91a6dfa5b3 v2
Added support for 'await' operator to promises
author | cin |
---|---|
date | Thu, 04 Feb 2016 02:43:05 +0300 |
parents | 8c0b95069066 |
children | cbe10ac0731e |
line wrap: on
line diff
--- a/Implab/IPromise.cs Sat Dec 12 22:12:44 2015 +0300 +++ b/Implab/IPromise.cs Thu Feb 04 02:43:05 2016 +0300 @@ -27,46 +27,6 @@ Exception Error { get; } /// <summary> - /// Creates a new promise dependend on the current one and resolved on - /// executing the specified handlers. - /// </summary> - /// <param name="success">The handler called on the successful promise completion.</param> - /// <param name="error">The handler is called if an error while completing the promise occurred.</param> - /// <param name="cancel">The handler is called in case of promise cancellation.</param> - /// <returns>The newly created dependant promise.</returns> - /// <remarks> - /// <para> - /// If the success handler is specified the dependend promise will be resolved after the handler is - /// executed and the dependent promise will be linked to the current one, i.e. the cancellation - /// of the dependent property will lead to the cancellation of the current promise. If the - /// success handler isn't specified the dependent promise will not be linked to and - /// will not be resolved after the successfull resolution of the current one. - /// </para> - /// <para> - /// When the error handler is specified, the exception raised during the current promise completion - /// will be passed to it as the parameter. If the error handler returns without raising an - /// exception then the dependant promise will be resolved successfully, otherwise the exception - /// raised by the handler will be transmitted to the dependent promise. If the handler wants - /// to passthrough the original exception it needs to wrap the exception with - /// the <see cref="PromiseTransientException"/>. The handler may raise <see cref="OperationCanceledException"/> - /// to cancel the dependant promise, the innner exception specifies the reason why the promise - /// is canceled. - /// </para> - /// <para> - /// If the cancelation handler is specified and the current promise is cancelled then the dependent - /// promise will be resolved after the handler is executed. If the cancelation handler raises the - /// exception it will be passed to the dependent promise. - /// </para> - /// </remarks> - /* IPromise Then(Action success, Action<Exception> error, Action<Exception> cancel); - IPromise Then(Action success, Action<Exception> error); - IPromise Then(Action success); - - IPromise Chain(Func<IPromise> chained, Func<Exception, IPromise> error, Func<Exception, IPromise> cancel); - IPromise Chain(Func<IPromise> chained, Func<Exception, IPromise> error); - IPromise Chain(Func<IPromise> chained);*/ - - /// <summary> /// Adds specified listeners to the current promise. /// </summary> /// <param name="success">The handler called on the successful promise completion.</param>