Find closure in GetOrAdd/AddOrUpdate factory
Recipe ID
OpenRewrite.Recipes.CSharp.CodeQuality.Performance.FindAvoidClosureInMethodArtifactOpenRewrite.Recipes.CSharp.CodeQualityDetect closures in lambdas passed to GetOrAdd or AddOrUpdate. Use the factory overload that accepts a state argument to avoid allocations.
Single recipecsharpperformancecode-qualityProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe OpenRewrite.Recipes.CSharp.CodeQuality.Performance.FindAvoidClosureInMethodIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality