Skip to content

Collection was modified; enumeration operation may not execute during ViewModel.SaveAsync() #4232

Discussion options

You must be logged in to vote

@lwmorris067 do you have any code that interacts with a collection outside of rules? Like constructors or overrides of AddItem?

Constructors and AddItem operations occur during deserialization, possibly PropertyChanged and CollectionChanged events too (I'm not sure) - and if logic is triggered by those operations they could end up running in the middle of the deserialization process.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@lwmorris067
Comment options

@StefanOssendorf
Comment options

@rockfordlhotka
Comment options

Answer selected by lwmorris067
@lwmorris067
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants