You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a DistinctValues on a collection where same values are removed and added again, then re-adding items are not notified in the resulting collection.
for example:
var collection = new ObservableCollection<int>();
using (collection.ToObservableChangeSet()
.DistinctValues(value => value)
.Bind(out var distinctCollection)
.Subscribe())
{
collection.AddRange(new[] { 1, 1, 2, 3 });
Assert.That(distinctCollection, Is.EquivalentTo(new[] { 1, 2, 3 }));
collection.Remove(2);
Assert.That(distinctCollection, Is.EquivalentTo(new[] { 1, 3 }));
collection.Add(2);
Assert.That(distinctCollection, Is.EquivalentTo(new[] { 1, 3, 2 })); // <-- this doesn't assert as distinctCollection now contains { 1, 3 }
}
The text was updated successfully, but these errors were encountered:
When using a DistinctValues on a collection where same values are removed and added again, then re-adding items are not notified in the resulting collection.
for example:
The text was updated successfully, but these errors were encountered: