Use generic Enum.GetNames for closed source enums

Proprietary

Replace resolved Enum.GetNames(typeof(T)) with GetNames<T>() for a closed source enum owned by the current project when every effective target is .NET5+. Retain string-array return attribution, call identity, receiver and type node. Keep external/open types, unknown ownership/imports, old syntax, source shadows, comments, deferred contexts and conditional snapshots unchanged.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net5.UseGenericEnumGetNamesForSourceEnums
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net5.UseGenericEnumGetNamesForSourceEnums

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.