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:
parent
12fb020a27
commit
2620c825c4
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user