Use generic Enum.GetNames for closed source enums
ProprietaryReplace 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. UseGenericEnumGetNamesForSourceEnumsmod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net5. UseGenericEnumGetNamesForSourceEnumsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.