Use OperatingSystem methods instead of RuntimeInformation
ProprietaryUse 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. FindUseOperatingSystemMethodsmod run . --recipe= OpenRewrite. Recipes. CSharp. CodeQuality. Style. FindUseOperatingSystemMethodsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.