Mercurial > pub > ImplabNet
comparison 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 |
comparison
equal
deleted
inserted
replaced
137:238e15580926 | 138:f75cfa58e3d4 |
---|---|
6 /// </summary> | 6 /// </summary> |
7 public interface IDeferred : ICancellable { | 7 public interface IDeferred : ICancellable { |
8 | 8 |
9 void Resolve(); | 9 void Resolve(); |
10 | 10 |
11 /// <summary> | |
12 /// Reject the promise with the specified error. | |
13 /// </summary> | |
14 /// <param name="error">The reason why the promise is rejected.</param> | |
15 /// <remarks> | |
16 /// Some exceptions are treated in a special case: | |
17 /// <see cref="OperationCanceledException"/> is interpreted as call to <see cref="Cancel()"/> method, | |
18 /// and <see cref="PromiseTransientException"/> is always unwrapped and its | |
19 /// <see cref="PromiseTransientException.InnerException"> is used as the reason to reject promise. | |
20 /// </remarks> | |
11 void Reject(Exception error); | 21 void Reject(Exception error); |
12 } | 22 } |
13 } | 23 } |
14 | 24 |