Use OperatingSystem methods instead of RuntimeInformation

Proprietary

Use OperatingSystem.IsWindows() and similar methods instead of RuntimeInformation.IsOSPlatform(). The OperatingSystem methods are more concise and can be optimized by the JIT.

OpenRewrite.Recipes.CSharp.CodeQuality.Style.FindUseOperatingSystemMethods
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Style.FindUseOperatingSystemMethods

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