##// END OF EJS Templates
PollingComponent: implemented correct stopping
PollingComponent: implemented correct stopping

File last commit:

r249:d82909310094 v3
r259:7d52dc684bbd v3
Show More
ExceptionHelpers.cs
20 lines | 700 B | text/x-csharp | CSharpLexer
/ Implab / ExceptionHelpers.cs
cin
Added awaiters to promises...
r248 using System;
using System.Reflection;
using System.Runtime.ExceptionServices;
namespace Implab {
cin
Implab.Test moved to xunit...
r249 static class ExceptionHelpers {
public static Exception Rethrow(this Exception that) {
cin
Added awaiters to promises...
r248 ExceptionDispatchInfo.Capture(that).Throw();
cin
Implab.Test moved to xunit...
r249 return new TargetInvocationException(that);
cin
Added awaiters to promises...
r248 }
cin
Implab.Test moved to xunit...
r249 public static Exception Wrap(this Exception that) {
if (that == null)
return new Exception();
else if (that is OperationCanceledException)
return new OperationCanceledException("The operation has been cancelled", that);
cin
Added awaiters to promises...
r248 else
cin
Implab.Test moved to xunit...
r249 return new TargetInvocationException(that);
cin
Added awaiters to promises...
r248 }
}
}