##// END OF EJS Templates
Reimplemented JsonXmlReader, added support for null values: JSON null values are...
Reimplemented JsonXmlReader, added support for null values: JSON null values are mapped to empty nodes with 'xsi:nil' attribute set to 'true'

File last commit:

r203:4d9830a9bbb8 v2
r227:8d5de4eb9c2c v2
Show More
PromiseHelper.cs
22 lines | 663 B | text/x-csharp | CSharpLexer
using Implab.Parallels;
using System.Threading;
namespace Implab.Test {
static class PromiseHelper {
public static IPromise<T> Sleep<T>(int timeout, T retVal) {
return AsyncPool.Invoke((ct) => {
ct.CancellationRequested(ct.CancelOperation);
Thread.Sleep(timeout);
return retVal;
});
}
public static IPromise Sleep(int timeout) {
return AsyncPool.Invoke((ct) => {
ct.CancellationRequested(ct.CancelOperation);
Thread.Sleep(timeout);
return 0;
});
}
}
}