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

"Specified" properties #1134

Open
mateusmachado90 opened this issue Feb 29, 2024 · 6 comments
Open

"Specified" properties #1134

mateusmachado90 opened this issue Feb 29, 2024 · 6 comments

Comments

@mateusmachado90
Copy link

After updating protobuf-net in our project, we noticed that the properties with suffix "Specified" have been replaced by "ShouldSerialize..." methods. Is it possible to configure protobuf-net to generate properties instead of methods in the current version?

@mgravell
Copy link
Member

That doesn't exist as an option today, but in theory it is a possible alternative; however, I perceive the *Specified pattern as being more prone to causing more confusion. I would encourage you to consider the ShouldSerilaize*() pattern here - or is this for a back-compat / version-upgrade thing? What is the scale of your scenario? If it is small, it should be possible to add this manually via partial class - but obviously very large systems might not go well this way.

@mateusmachado90
Copy link
Author

Unfortunately it's a large system, which relies largely on the old pattern, to the point that we are considering sticking to older versions.

For planning purposes, how realistic would it be for us to expect this to be added back as an option?

Thanks in advance.

@mgravell
Copy link
Member

mgravell commented Mar 4, 2024

let me have a look this week - and see what else (hence 796 above) we might want to do at the same time; this is actually good timing, as I need to revisit all of that code because of the new protobuf "editions" feature (if you know: you know!)

@mateusmachado90
Copy link
Author

Glad to hear it from you! Thanks!

@ah-jr
Copy link

ah-jr commented Mar 28, 2024

I would very much benefit from the same change, any updates @mgravell?

@lorensi
Copy link

lorensi commented Apr 15, 2024

Is there any update on this issue? Thank you!

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

4 participants