Use Frozen collections instead of Immutable
ProprietaryReplace ToImmutableDictionary() with ToFrozenDictionary() and ToImmutableHashSet() with ToFrozenSet(). Frozen collections (.NET 8+) provide better read performance for collections populated once and read many times.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net9. UseFrozenCollectionsmod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net9. UseFrozenCollectionsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.