Skip to content

Add an option to generate the registration classes as internal - #15

Open
Dresel wants to merge 1 commit into
ycanardeau:mainfrom
Dresel:internal-registration
Open

Dresel wants to merge 1 commit into
ycanardeau:mainfrom
Dresel:internal-registration

Conversation

@Dresel

@Dresel Dresel commented Oct 7, 2026

Copy link
Copy Markdown

Every project that uses the StringLocalizer generation gets a public ResXGenerator.Registration.ResXGeneratorRegistrationExtension. When such a project references another one that generates it too, both classes are visible and services.UsingResXGenerator() no longer compiles (CS0121, ambiguous call).

ResXGenerator_InternalRegistration=true generates the global and the per-namespace registration classes as internal. The referenced project then offers its registration through a public method of its own. The default stays public, so existing projects are unaffected.

Every project that uses the StringLocalizer generation gets a public
ResXGenerator.Registration.ResXGeneratorRegistrationExtension. When such a
project references another one that generates it too, both classes are
visible and services.UsingResXGenerator() no longer compiles (CS0121,
ambiguous call).

ResXGenerator_InternalRegistration=true generates the global and the
per-namespace registration classes as internal. The referenced project then
offers its registration through a public method of its own. The default
stays public, so existing projects are unaffected.
@Dresel Dresel mentioned this pull request Oct 7, 2026
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.

1 participant