Async virtual colleciton now updates its version (enumerator debugging feature) when its typed list changes (but not when lazy-loading items because the enumerator explicitly stays valid then)

This commit is contained in:
Markus Ewald 2025-07-29 13:12:53 +02:00
parent 12fb020a27
commit 2620c825c4

View File

@ -627,6 +627,10 @@ namespace Nuclex.Avalonia.Collections {
}
} // lock this
#if DEBUG
++this.version;
#endif
return itemCount;
}
@ -738,6 +742,9 @@ namespace Nuclex.Avalonia.Collections {
lock(this) {
this.assumedCount = itemCount;
}
#if DEBUG
++this.version;
#endif
}
// The count may have been adjusted if this truncated the list,