- 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>`
We already have some specific internal methods for routing certain methods via an untyped property to a typed property, but adding support for the visitor pattern allows us to support arbitrary use-cases.
`PropertyChanged` is not being fired when binding is disposed. Also change some other unit tests to ensure that priority passed in event args is correct.