Tmds.DBus.Tool: Add an option to generate public types - #83
Merged
Conversation
tmds
reviewed
Aug 25, 2020
| _catOption = Configuration.Option("--cat", "Write to standard out instead of file", CommandOptionType.NoValue); | ||
| _skipOptions = Configuration.Option("--skip", "DBus interfaces to skip", CommandOptionType.MultipleValue); | ||
| _interfaceOptions = Configuration.Option("--interface", "DBus interfaces to include, optionally specify a name (e.g. 'org.freedesktop.NetworkManager.Device.Wired:WiredDevice')", CommandOptionType.MultipleValue); | ||
| _publicTypesOption = Configuration.Option("--public-types", "The types generated by this tool will have a public access modifier (default: internal)", CommandOptionType.NoValue); |
Owner
There was a problem hiding this comment.
nit: rename --public-types to --public
and The code generated by this tool will have public access modifier (default: internal).
Owner
|
@matdug thanks for this contribution! It looks good to me. I have a small suggestion on naming/phrasing. |
Contributor
Author
|
Hi @tmds , I made the changes as per your comments. |
Owner
|
Thank you @matdug! |
Owner
|
@matdug this is part of v0.9.0 which I just uploaded to nuget.org. |
This was referenced Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the types that are generated by the codegen tool have an implicit "internal" access modifier. This is fine if you intend to use the generated types from within the same assembly where they will be included, but they are not visible to other assemblies.
I would like to add the possibility to generate these types with the "public" access modifier so that they can be referenced from other assemblies. For this I propose the --public-types command line option. The default behaviour when the option is omitted is for the types to remain "internal".