static PlatformMethods() { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { Instance = new WindowsPlatformMethods(); } else { Instance = new PosixPlatformMethods(); } }
static PlatformMethods() { #if NETCOREAPP if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { Instance = new WindowsPlatformMethods(); } else { Instance = new PosixPlatformMethods(); } #else Instance = new WindowsPlatformMethods(); #endif }