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