-
Notifications
You must be signed in to change notification settings - Fork 5.4k
ReadOnlyObservableCollection.CollectionChanged should be made public #14267
Copy link
Copy link
Open
Labels
api-needs-workAPI needs work before it is approved, it is NOT ready for implementationAPI needs work before it is approved, it is NOT ready for implementationarea-System.Collectionshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorswishlistIssue we would like to prioritize, but we can't commit we will get to it yetIssue we would like to prioritize, but we can't commit we will get to it yet
Milestone
Metadata
Metadata
Assignees
Labels
api-needs-workAPI needs work before it is approved, it is NOT ready for implementationAPI needs work before it is approved, it is NOT ready for implementationarea-System.Collectionshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorswishlistIssue we would like to prioritize, but we can't commit we will get to it yetIssue we would like to prioritize, but we can't commit we will get to it yet
Type
Fields
Give feedbackNo fields configured for issues without a type.
The
ReadOnlyObservableCollection.CollectionChangedevent is protected, which is flawed, it prevents you from being able to observe changes to it without casting toINotifyCollectionChanged.I suspect the original thinking was because the collection is "read-only" it never changes - this is not correct. Read-only in .NET means that the consumer has a read-only view over a collection (which is why we project
IReadOnlyList<T>toIVectorView<T>), not that the contents are immutable and never change.While we've made
protectedmemberspublicin the past (such asException.HResult), this event was markedvirtual, which while binary compatible, would be a source-breaking change for those that overrode it. I suspect very little have overridden it, but we may want to consider adding a new event with a different name such asChanged.