如何在出现错误之前检查此处的值?或如何抑制错误?还是只是获取NULL?
postgres=# SELECT DECODE('166D24ABBEDR', 'hex');
ERROR: invalid hexadecimal digit: "R"
答案 0 :(得分:1)
您可以使用var optimized =
observable
.OfType<IReadableGeometry>()
.Where(g => !(g is IOptimizedGeometry))
.Select(g => Observable.Defer(() => Observable.Start(g.Optimize)))
.Merge(10);
表达式和Merge()
函数:
var scheduler = new LimitedConcurrencyLevelTaskScheduler(10);
var optimized =
observable
.OfType<IReadableGeometry>()
.Where(g => !(g is IOptimizedGeometry))
.ObserveOn(scheduler)
.Select(g => g.Optimize());