Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support serialisation of IReadOnlyList<T> and IReadOnlyCollection<T> #91

Closed
drewnoakes opened this issue Jul 1, 2015 · 2 comments
Closed
Labels
enhancement Requires or request to feature enhancement

Comments

@drewnoakes
Copy link
Contributor

Currently an exception is thrown if attempting to create a serialiser for a type that has a field of IReadOnlyList<T>.

IList<T> is supported. Is there any reason a read only list couldn't be supported too?

@drewnoakes drewnoakes changed the title Support serialisation of IReadOnlyList and IReadOnlyCollection Support serialisation of IReadOnlyList<T> and IReadOnlyCollection<T> Jul 3, 2015
@yfakariya yfakariya added the enhancement Requires or request to feature enhancement label Jul 5, 2015
@yfakariya
Copy link
Member

Because it was not required. And historically, I has not supported ".NET 4.5" only features so aggresively. I will add them to default collection of SerializationContext by default.

drewnoakes added a commit to drewnoakes/msgpack-cli that referenced this issue Jul 7, 2015
…oses msgpack#91.

- IReadOnlyDictionary<,>
- IReadOnlyCollection<>
- IReadOnlyList<>
@drewnoakes
Copy link
Contributor Author

Thanks for your reply. I put together a PR for this that hopefully makes it easier for you to add this feature.

yfakariya added a commit that referenced this issue Jul 20, 2015
PR #93 was perfect in terms of abstract type support itself.
But there are more considerations about custom types which only implements read only collection interfaces. It requires additional collection serializer hierarchy and additional kinds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requires or request to feature enhancement
Projects
None yet
Development

No branches or pull requests

2 participants