* Send one notification per sequential range in RemoveAll method of AvaloniaList (optimized)
* Simplified
* Make unit tests a bit more understandable.
Co-authored-by: Gitea <gitea@fake.local>
Co-authored-by: Dariusz Komosiński <darek.komosinski@gmail.com>
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
Co-authored-by: Steven Kirk <grokys@gmail.com>
And no longer target net461 in unit tests as we've not had a test pass in net core and fail in netfx in years, and it bloats our CI time; EXCEPT Avalonia.Markup.Xaml.UnitTests where we're still testing against net4.7 as MSIL generation is runtime-sensitive.
- Allow adding a binding to a cleared property while ending a batch update. Need to check that the existing value isn't a remove sentinel here, otherwise the binding will be lost.
- When a binding is added during the end of a batch update, `_batchUpdate` will be non-null but newly added bindings shouldn't have `BeginBatchUpdate` called on them because no `EndBatchUpdate` will arrive (as we've already called them)
- Add sanity checks to the unit test to make sure that correct notifications are raised
`DirectProperty` stored a `EnabledDataValidation` flag in its metadata but also had an `IsDataValidationEnabled` property in `DirectPropertyBase` which was the one used by `AvaloniaObject`. Use the version from metadata so that it can be overridden and remove the flag from `DirectPropertyBase`.
Tests for `AvaloniaObject.IsSet` were in the `Metadata` test class, though `IsSet` has nothing to do with metadata. Moved them into `SetValue` which is more relevant.
- Pass information for all property changes to `OnPropertyChangedCore`; whether they result in an effective value change or not
- Added `GetBaseValue` to get a value with a specified priority
- Change the signature of `OnPropertyChanged` again to take an `AvaloniaPropertyChangedEventArgs<T>`