Find closure in GetOrAdd that could use factory argument

Proprietary

Detect ConcurrentDictionary.GetOrAdd calls with lambdas that capture variables. Use the overload with a factory argument parameter to avoid allocation.

OpenRewrite.Recipes.CSharp.CodeQuality.Performance.FindAvoidClosureByUsingFactoryArg
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Performance.FindAvoidClosureByUsingFactoryArg

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.