chore: 优化迭代逻辑
parent
3bdf46e5a5
commit
043f8e2d88
|
@ -592,10 +592,7 @@ string propertyName
|
||||||
var current = (from item in remaining
|
var current = (from item in remaining
|
||||||
where item.CanBeSerialized
|
where item.CanBeSerialized
|
||||||
select item).ToList();
|
select item).ToList();
|
||||||
var nextBatch = (from item in remaining
|
remaining = remaining.Except(current).ToList();
|
||||||
where !item.CanBeSerialized
|
|
||||||
select item).ToList();
|
|
||||||
remaining = nextBatch;
|
|
||||||
|
|
||||||
if (current.Count == 0) {
|
if (current.Count == 0) {
|
||||||
// We do cycle-detection when building the list of objects passed to this
|
// We do cycle-detection when building the list of objects passed to this
|
||||||
|
|
Loading…
Reference in New Issue