Use the same AES factory for a closed AesManaged local
ProprietaryReplace parameterless AesManaged plain-local construction with Aes.Create(), preserving its existing lifetime. Require every reference to be an attributed forwarded property or transform/key-generation receiver. Retype the local and members consistently. Exclude using resources, initialization, escapes, captures, identity, explicit disposal, async/iterators, directives and conditional snapshots. Opt-in modern-.NET compatibility; no mode/key/format choice.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net6. UseClosedAesManagedLocalFactorymod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net6. UseClosedAesManagedLocalFactoryInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.