-
Notifications
You must be signed in to change notification settings - Fork 21
Support internal
access modifiers for generated types
#183
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 internal
access modifiers for generated types
#183
Conversation
- Options are public (true, default) or internal (false) - Iterate over all members in Runtime.g.cs and update modifiers - Update modifier in ClassName.g.cs
No test is available in c2cs/artifacts/bin/c2cs.Tests/release/c2cs.Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again
Hey @OleRoss. Thanks for the interest.
|
|
@OleRoss Is this ready to be merged as is? As for automated tests, it would be good to look into but not a deal breaker as this feature is relatively small. You can check out the code folders in |
From my side, yes, it is ready to merge. If you like the testing structure in the pr #186, I could add tests there later. |
I can do a release to NuGet if you want @OleRoss. Or are you using the tool by running it locally? |
I am using the dotnet tool via the nuget package. So, a new nuget package would be appreciated |
Having issues with NuGet.org login. I'll try again this weekend. |
No worries, thanks for your effort. |
@OleRoss Thanks for your patience. I resolved the NuGet.org license issue and was able to re-generate API key to upload packages to NuGet.org. You'll see your changes as part of the release:
I'll take a look at your changes for tests soon. Cheers. |
@lithiumtoast No worries. Take your time, and thank you for creating the new version. The changes work as expected. |
Motivation
First of all, thank you for providing this library. In my use case, I am generating bindings and only use them inside the assembly. I could not find a way to configure the access modifiers of the generated types, so this is my proposal to add them.
Changes
AreTypeAccessModifiersPublic
to c# generation optionstrue
, default) orinternal
(false)Only tested by hand. I did not find any unit tests covering settings. If there are any, please point me towards those.