Use the default RNG factory in a closed plain local
ProprietaryReplace a parameterless RNGCryptoServiceProvider plain local with RandomNumberGenerator.Create(), retaining the original lifetime and every bound byte-array fill call. Support inferred and explicit provider types; skip escapes, configuration, captures, async/iterators, initialization, cleanup and conditional snapshots. Opt-in modern-.NET compatibility port; no algorithm strengthening.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net6. UseClosedRandomNumberGeneratorLocalFactorymod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net6. UseClosedRandomNumberGeneratorLocalFactoryInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.