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