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

Extensible Code Generation #4

Closed
megakid opened this issue Jul 20, 2019 · 2 comments
Closed

Extensible Code Generation #4

megakid opened this issue Jul 20, 2019 · 2 comments
Assignees

Comments

@megakid
Copy link

megakid commented Jul 20, 2019

We use serialisers such as protobuf-net and others, it would be great if an extension point be made such as adding attributes to members (one workaround might be to add custom serialisation methods to a partial class or could we add [DataMember(Order = 1)]/[DataContract] by default).

@andrewlock
Copy link
Owner

Hmmm, that's an interesting one. As I understand it, these sort of structs are not supported by protobuf-net, so that one is probably a moot point?

The code assumes that types will be mutable around the elected members. Accordingly, custom structs are not supported, since they should be immutable.

With regard to other attributes, it would certainly be possible to add extra options, though as I don't use them, I'm a little hesitant to implement it myself. Happy to look at PRs of course 🙂

@andrewlock
Copy link
Owner

I think this is (finally) fully covered by the work in #117 which will be released soon!

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

No branches or pull requests

2 participants