Skip to content

2.2.0: Merge pull request #23 from ipvalverde/fix-observable-collection-bug

Latest
Compare
Choose a tag to compare
@ipvalverde ipvalverde released this 03 Nov 16:55
· 11 commits to master since this release
97f3b17

Breaking change

WithCollectionProperty accepting ICollection as the expression property for the model are now obsolete. If your collection property does not fit any of the other overloads (it is not a List<T>, HashSet<T> or Collection<T>), ensure that the property is already initialized and use the method WithInitializedCollectionProperty instead.

Other changes

  • The WithCollectionProperty methods now ensure that the collection property is of the exact same type of the expected collection. So if you're using the WithCollectionProperty overload that expects a collection property of Collection<T>, your model must have its collection property as a Collection<T>. If the property is of type ObservableCollection<T>, for example, which inherits from Collection<T>, an error will be thrown at runtime. For such cases, the WithInitializedCollectionProperty must be used instead.