Deserialize mutable collection interfaces with mutable concrete types by AArnott · Pull Request #778 · MessagePack-CSharp/MessagePack-CSharp · GitHub
Skip to content

Deserialize mutable collection interfaces with mutable concrete types#778

Merged
AArnott merged 1 commit into
MessagePack-CSharp:masterfrom
AArnott:fix253
Jan 17, 2020
Merged

Deserialize mutable collection interfaces with mutable concrete types#778
AArnott merged 1 commit into
MessagePack-CSharp:masterfrom
AArnott:fix253

Conversation

@AArnott

@AArnott AArnott commented Jan 16, 2020

Copy link
Copy Markdown
Collaborator

For example: don't use a T[] to back an IList<T> since that blocks use of IList<T>.Add which probably worked before serialization.

Fixes #253

@AArnott AArnott added this to the v2.1 milestone Jan 16, 2020
@AArnott AArnott requested a review from neuecc January 16, 2020 21:07
@AArnott AArnott self-assigned this Jan 16, 2020

@neuecc neuecc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, but Add is better than Insert

For example: don't use a `T[]` to back an `IList<T>` since that blocks use of `IList<T>.Add` which probably worked before serialization.

Fixes MessagePack-CSharp#253
@AArnott AArnott merged commit 983ea3f into MessagePack-CSharp:master Jan 17, 2020
@AArnott AArnott deleted the fix253 branch January 17, 2020 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default resolver deserializes ICollection<T> as T[]

2 participants