annotate Implab/IPromise.cs @ 275:6fefd5811b9b v3

refactoring
author cin
date Fri, 27 Apr 2018 16:57:30 +0300
parents fb70574741a1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
1 using System;
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
2 using System.Collections.Generic;
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
3 using System.Linq;
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
4 using System.Text;
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
5
66
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
6 namespace Implab {
243
b1e0ffdf3451 working on promises
cin
parents: 242
diff changeset
7 public interface IPromise {
26
f0bf98e4d22c refactoring
cin
parents: 25
diff changeset
8
66
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
9 /// <summary>
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
10 /// Тип результата, получаемого через данное обещание.
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
11 /// </summary>
242
cbe10ac0731e Working on promises
cin
parents: 151
diff changeset
12 Type ResultType { get; }
25
9bf5b23650c9 refactoring
cin
parents: 19
diff changeset
13
74
c4140283575c minor fixes
cin
parents: 66
diff changeset
14 /// <summary>
99
8ddf1648eca4 fixed TransientPromiseException handling
cin
parents: 96
diff changeset
15 /// Обещание является выполненым, либо успешно, либо с ошибкой, либо отменено.
74
c4140283575c minor fixes
cin
parents: 66
diff changeset
16 /// </summary>
244
eee3e49dd1ff working on promises
cin
parents: 243
diff changeset
17 bool IsResolved { get; }
66
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
18
242
cbe10ac0731e Working on promises
cin
parents: 151
diff changeset
19 bool IsRejected { get; }
cbe10ac0731e Working on promises
cin
parents: 151
diff changeset
20
244
eee3e49dd1ff working on promises
cin
parents: 243
diff changeset
21 bool IsFulfilled { get; }
25
9bf5b23650c9 refactoring
cin
parents: 19
diff changeset
22
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 104
diff changeset
23 /// <summary>
138
f75cfa58e3d4 added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents: 119
diff changeset
24 /// Исключение возникшее в результате выполнения обещания, либо причина отмены.
f75cfa58e3d4 added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents: 119
diff changeset
25 /// </summary>
242
cbe10ac0731e Working on promises
cin
parents: 151
diff changeset
26 Exception RejectReason { get; }
138
f75cfa58e3d4 added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents: 119
diff changeset
27
f75cfa58e3d4 added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
cin
parents: 119
diff changeset
28 /// <summary>
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 104
diff changeset
29 /// Adds specified listeners to the current promise.
75
4439140706d0 major refactoring, added tasks support
cin
parents: 74
diff changeset
30 /// </summary>
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 104
diff changeset
31 /// <param name="success">The handler called on the successful promise completion.</param>
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 104
diff changeset
32 /// <param name="error">The handler is called if an error while completing the promise occurred.</param>
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 104
diff changeset
33 /// <returns>The current promise.</returns>
244
eee3e49dd1ff working on promises
cin
parents: 243
diff changeset
34 void Then(IResolvable next);
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 104
diff changeset
35
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 104
diff changeset
36 /// <summary>
74
c4140283575c minor fixes
cin
parents: 66
diff changeset
37 /// Преобразует результат обещания к заданному типу и возвращает новое обещание.
c4140283575c minor fixes
cin
parents: 66
diff changeset
38 /// </summary>
66
790e8a997d30 Refactoring
cin
parents: 33
diff changeset
39 IPromise<T> Cast<T>();
247
fb70574741a1 working on promises
cin
parents: 244
diff changeset
40
fb70574741a1 working on promises
cin
parents: 244
diff changeset
41 void Join();
fb70574741a1 working on promises
cin
parents: 244
diff changeset
42
fb70574741a1 working on promises
cin
parents: 244
diff changeset
43 void Join(int timeout);
7
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
44 }
7ea9363fef6c inital progress handling
cin
parents:
diff changeset
45 }