TL; DR;
I need to extract the string value of the parameter of all calls to the index operator Microsoft.Extensions.Localization.IStringLocalizerin my .NET code. In fact, I also need the full name of the enclosing class.
Warning. The above also includes my views on the ASP.NET Core MVC razor.
Basically, my need is very similar to the Find All Links functionality in Visual Studio.
Why other thoughts
The reason is that we value the flow of development with the help of IStringLocalizerwithout the need to create resources. In addition, we replaced the use of resource files with a database repository using Damien Bods AspNetCoreLocalization .
This allows us to have business experts to do all the translations (1) without access to the web server file system and (2) from the pleasant interface that we provide, and (3) regardless of the development cycle. However, for business experts to know which texts exist, and therefore need translation, we need to extract all the applications of the index operator IStringLocalizer(s IViewStringLocalizor).
Based on this article , I partially managed to extract information from the downloaded assemblies.
My main concerns:
- My code is based on SDILReader, which is quite old and no longer supported and apparently has a number of problems (with the newer CIL?)
- How will I derive usage in razor views that JIT compiles at runtime?
- , , CI
- ?
- - ?
- , .NET Framework/runtimes #.
:-)