Mercurial > pub > ImplabNet
annotate Implab/IDeferred.cs @ 141:0fa293bb1351 v2
fixed JSON writer
author | cin |
---|---|
date | Tue, 24 Feb 2015 00:54:22 +0300 |
parents | f75cfa58e3d4 |
children | 16f926ee499d |
rev | line source |
---|---|
119 | 1 using System; |
2 | |
3 namespace Implab { | |
4 /// <summary> | |
5 /// Deferred result, usually used by asynchronous services as the service part of the promise. | |
6 /// </summary> | |
7 public interface IDeferred : ICancellable { | |
8 | |
9 void Resolve(); | |
10 | |
138
f75cfa58e3d4
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents:
119
diff
changeset
|
11 /// <summary> |
f75cfa58e3d4
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents:
119
diff
changeset
|
12 /// Reject the promise with the specified error. |
f75cfa58e3d4
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents:
119
diff
changeset
|
13 /// </summary> |
f75cfa58e3d4
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents:
119
diff
changeset
|
14 /// <param name="error">The reason why the promise is rejected.</param> |
f75cfa58e3d4
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents:
119
diff
changeset
|
15 /// <remarks> |
f75cfa58e3d4
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents:
119
diff
changeset
|
16 /// Some exceptions are treated in a special case: |
f75cfa58e3d4
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents:
119
diff
changeset
|
17 /// <see cref="OperationCanceledException"/> is interpreted as call to <see cref="Cancel()"/> method, |
f75cfa58e3d4
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents:
119
diff
changeset
|
18 /// and <see cref="PromiseTransientException"/> is always unwrapped and its |
f75cfa58e3d4
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents:
119
diff
changeset
|
19 /// <see cref="PromiseTransientException.InnerException"> is used as the reason to reject promise. |
f75cfa58e3d4
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents:
119
diff
changeset
|
20 /// </remarks> |
119 | 21 void Reject(Exception error); |
22 } | |
23 } | |
24 |