Mercurial > pub > ImplabNet
comparison Implab/RejectedPromise`1.cs @ 249:d82909310094 v3
Implab.Test moved to xunit
Complete set of PromiseHelpers (Then, Catch, Finally)
Removed obsolete types ICancellable, ICancellationToken
author | cin |
---|---|
date | Wed, 31 Jan 2018 11:28:38 +0300 |
parents | 5cb4826c2c2a |
children |
comparison
equal
deleted
inserted
replaced
248:5cb4826c2c2a | 249:d82909310094 |
---|---|
22 public IPromise<T2> Cast<T2>() { | 22 public IPromise<T2> Cast<T2>() { |
23 return (IPromise<T2>)(IPromise<T>)this; | 23 return (IPromise<T2>)(IPromise<T>)this; |
24 } | 24 } |
25 | 25 |
26 void IPromise.Join() { | 26 void IPromise.Join() { |
27 m_reason.ThrowInvocationException(); | 27 throw m_reason.Wrap(); |
28 } | 28 } |
29 | 29 |
30 void IPromise.Join(int timeout) { | 30 void IPromise.Join(int timeout) { |
31 m_reason.ThrowInvocationException(); | 31 throw m_reason.Wrap(); |
32 } | 32 } |
33 | 33 |
34 public T Join() { | 34 public T Join() { |
35 m_reason.ThrowInvocationException(); | 35 throw m_reason.Wrap(); |
36 throw new Exception(); // unreachable code | |
37 } | 36 } |
38 | 37 |
39 public T Join(int timeout) { | 38 public T Join(int timeout) { |
40 m_reason.ThrowInvocationException(); | 39 throw m_reason.Wrap(); |
41 throw new Exception(); // unreachable code | |
42 } | 40 } |
43 | 41 |
44 public void Then(IResolvable next) { | 42 public void Then(IResolvable next) { |
45 next.Reject(m_reason); | 43 next.Reject(m_reason); |
46 } | 44 } |