Skip to content

added ServicesTypePrefix property in RuntimeTypeModel.CompilerOptions (#1184)#1193

Merged
mgravell merged 5 commits intoprotobuf-net:mainfrom
MFinkBK:configurable-service-prefix
Feb 10, 2025
Merged

added ServicesTypePrefix property in RuntimeTypeModel.CompilerOptions (#1184)#1193
mgravell merged 5 commits intoprotobuf-net:mainfrom
MFinkBK:configurable-service-prefix

Conversation

@MFinkBK
Copy link
Contributor

@MFinkBK MFinkBK commented Feb 10, 2025

this lets you override the <Service> prefix for the generated serializer services class

fixes: #1184

…#1184)

this lets you override the "<Service>" prefix for the generated serializer services class
@mgravell
Copy link
Member

I think I'm fine with this, but I wonder if we should do something simpler and just change the default to ___PBN_Services___ or similar, which should be perfectly fine, while being suitably unlikely to collide?

@MFinkBK
Copy link
Contributor Author

MFinkBK commented Feb 10, 2025

I'm fine with either change, but I didn't know if the <Service> prefix has any other meaning (than unreferenceable from C# code maybe?). If you want, I can modify the PR.

@mgravell
Copy link
Member

It has no significance other than being known to be non-conflicting, by being "unpronounceable"; but something like the above should be fine in all reasonable scenarios, without complicating the public API

@MFinkBK
Copy link
Contributor Author

MFinkBK commented Feb 10, 2025

I reverted my change and just use the prefix you suggested. Just tell me if I should squash the commits into a single commit

@MFinkBK
Copy link
Contributor Author

MFinkBK commented Feb 10, 2025

I'm sorry about the whitespace noise

@mgravell mgravell merged commit 45d06aa into protobuf-net:main Feb 10, 2025
1 check passed
@mgravell
Copy link
Member

Should be on myget shortly. Thanks for the input!

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.

Make RuntimeTypeModel service prefix overridable

2 participants