VocaDB / ResXFileCodeGenerator

VocaDb.ResXFileCodeGenerator is a C# source generator to generate strongly-typed resource classes for looking up localized strings.

Home Page:https://www.nuget.org/packages/VocaDb.ResXFileCodeGenerator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate internal class

mkaring opened this issue · comments

Hello,
do you have any plans on adding the possibility to select if the generated code should have public or internal visibility? Most of my use-cases do not require public visible access to the resources and so I would really like to be able to change the visibility to avoid cluttering the public API.

Either a global property or a metadata entry for each file would be most suited to handle this I think.

I've added an option ResXFileCodeGenerator_PublicClass to select if the generated code should have public or internal visibility. I haven't pushed the changes yet, but I'll publish a NuGet package tomorrow if possible.

Now VocaDb.ResXFileCodeGenerator generates internal classes by default. You can change this behavior by setting
PublicClass (per file) or ResXFileCodeGenerator_PublicClass (globally) to true. For more information, see README.md.

That works perfectly. Thank you for the support.