diff Implab/IDeferred.cs @ 138:f75cfa58e3d4 v2

added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
author cin
date Tue, 17 Feb 2015 18:16:26 +0300
parents 2573b562e328
children 16f926ee499d
line wrap: on
line diff
--- a/Implab/IDeferred.cs	Mon Feb 16 17:48:39 2015 +0300
+++ b/Implab/IDeferred.cs	Tue Feb 17 18:16:26 2015 +0300
@@ -8,6 +8,16 @@
 
         void Resolve();
 
+        /// <summary>
+        /// Reject the promise with the specified error.
+        /// </summary>
+        /// <param name="error">The reason why the promise is rejected.</param>
+        /// <remarks>
+        /// Some exceptions are treated in a special case: 
+        /// <see cref="OperationCanceledException"/> is interpreted as call to <see cref="Cancel()"/> method,
+        /// and <see cref="PromiseTransientException"/> is always unwrapped and its
+        /// <see cref="PromiseTransientException.InnerException"> is used as the reason to reject promise.
+        /// </remarks>
         void Reject(Exception error);
     }
 }