Preserve interface dispatch when modernizing crypto Clear cleanup
ProprietaryReplace attributed HashAlgorithm.Clear()/SymmetricAlgorithm.Clear() with ((IDisposable)receiver).Dispose(). These Clear methods dispatch through IDisposable; retain that behavior for custom reimplementations and hidden Dispose members. Preserve one receiver evaluation, null failures, cleanup placement and interface metadata. Skip custom Clear methods, method groups, conditional access, unresolved calls and conditional snapshots. Opt-in; no algorithm/key/cleanup-policy choice. Lambda/query contexts remain unchanged.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net6. UseInterfaceDisposeForCryptoClearmod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net6. UseInterfaceDisposeForCryptoClearInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.