annotate Implab/IResolvable.cs @ 281:e0916ddc9950 v3 tip

code cleanup and refactoring
author cin
date Fri, 01 Jun 2018 21:35:24 +0300
parents b904e0a3ba72
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
244
eee3e49dd1ff working on promises
cin
parents:
diff changeset
1 using System;
eee3e49dd1ff working on promises
cin
parents:
diff changeset
2
eee3e49dd1ff working on promises
cin
parents:
diff changeset
3 namespace Implab {
eee3e49dd1ff working on promises
cin
parents:
diff changeset
4 /// <summary>
eee3e49dd1ff working on promises
cin
parents:
diff changeset
5 /// Deferred result, usually used by asynchronous services as the service part of the promise.
eee3e49dd1ff working on promises
cin
parents:
diff changeset
6 /// </summary>
eee3e49dd1ff working on promises
cin
parents:
diff changeset
7 public interface IResolvable {
eee3e49dd1ff working on promises
cin
parents:
diff changeset
8
eee3e49dd1ff working on promises
cin
parents:
diff changeset
9 void Resolve();
eee3e49dd1ff working on promises
cin
parents:
diff changeset
10
eee3e49dd1ff working on promises
cin
parents:
diff changeset
11 /// <summary>
eee3e49dd1ff working on promises
cin
parents:
diff changeset
12 /// Reject the promise with the specified error.
eee3e49dd1ff working on promises
cin
parents:
diff changeset
13 /// </summary>
eee3e49dd1ff working on promises
cin
parents:
diff changeset
14 /// <param name="error">The reason why the promise is rejected.</param>
eee3e49dd1ff working on promises
cin
parents:
diff changeset
15 /// <remarks>
eee3e49dd1ff working on promises
cin
parents:
diff changeset
16 /// Some exceptions are treated in a special case:
eee3e49dd1ff working on promises
cin
parents:
diff changeset
17 /// <see cref="OperationCanceledException"/> is interpreted as call to <see cref="Cancel()"/> method,
eee3e49dd1ff working on promises
cin
parents:
diff changeset
18 /// and <see cref="PromiseTransientException"/> is always unwrapped and its
eee3e49dd1ff working on promises
cin
parents:
diff changeset
19 /// <see cref="PromiseTransientException.InnerException"> is used as the reason to reject promise.
eee3e49dd1ff working on promises
cin
parents:
diff changeset
20 /// </remarks>
eee3e49dd1ff working on promises
cin
parents:
diff changeset
21 void Reject(Exception error);
eee3e49dd1ff working on promises
cin
parents:
diff changeset
22 }
eee3e49dd1ff working on promises
cin
parents:
diff changeset
23 }
eee3e49dd1ff working on promises
cin
parents:
diff changeset
24