Cracker
How do I manage singleton Regex initialization in Scoped service ?
both IMaskingOperator and IMaskingPolicy is scoped service. I have regex pattern used with value of scoped service. In this case for performance, how can I ensure the regex is initialized only once ?
16 replies
❔ Evaluating C# Expressions At Runtime
I am looking alternative ways to evaluate C# expression at runtime. I have used
Roslyn Scripting API CSharpScript.RunAsync
but as mentioned github issues, its not designed to be called continuously because it keep creating new assembly in memory and not unloaded, causes memory leak (https://github.com/dotnet/roslyn/issues/41722)6 replies
❔ ✅ How to implement pool tracking in concurrent list ?
I am trying to add tracking to my logging service. (Web API project)
Once track count is matched, I disbound the ConcurrentBag and send list to logger service.
I need review in this approach where I don't want to lose log data since this method is called in every request.
52 replies
✅ ILGenerator Object Mapper Property Set
Hey, I have following object mapper for non nested class types https://www.paste.org/124478. There are some use cases where return value of Convert method is not re-assigned to destination type, therefore the passed TTgt target argument is not updated since the reference properties are not set directly, therefore I added "ref" wrapper but I don't want to change existing codes to "ref" version. How can I update the existing ILGenerator that maps the properties explicitly, meaning it will update the argument target parameter as reference
3 replies
❔ Async Await On Logging - Waiting Response Without Await Keyword
I have logging service where I call the logger.log async method without awaiting the response, expected behaviour is that the method calls logger.log will return the response without await the log response, but its otherwise
21 replies
Source Generator For NuGet References
Hey, I have source generator project which reads metadata of dll references and via that information creates additional interfaces. Now I changed target project to read those DLLs as NuGet references. Is it possible to read NuGet dll metadata with source generator ? I couldn't find any documentation
1 replies