248
|
1 using System;
|
|
2
|
|
3 namespace Implab
|
|
4 {
|
|
5 public struct ResolvedPromise : IPromise {
|
|
6 public Type ResultType => typeof(void);
|
|
7
|
|
8 public bool IsResolved => true;
|
|
9
|
|
10 public bool IsRejected => false;
|
|
11
|
|
12 public bool IsFulfilled => true;
|
|
13
|
|
14 public Exception RejectReason => null;
|
|
15
|
|
16 public IPromise<T> Cast<T>() {
|
|
17 throw new InvalidCastException();
|
|
18 }
|
|
19
|
|
20 public void Join() {
|
|
21 }
|
|
22
|
|
23 public void Join(int timeout) {
|
|
24 }
|
|
25
|
|
26 public void Then(IResolvable next) {
|
|
27 next.Resolve();
|
|
28 }
|
|
29 }
|
|
30 } |