You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
519 B

  1. #if !NET20
  2. using System;
  3. using System.Runtime.InteropServices;
  4. namespace Apewer.WebSocket
  5. {
  6. internal static class Runtime
  7. {
  8. public static bool IsRunningOnMono()
  9. {
  10. return Type.GetType("Mono.Runtime") != null;
  11. }
  12. public static bool IsRunningOnWindows()
  13. {
  14. //#if NET45 || NET40
  15. return true;
  16. //#else
  17. //return (RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
  18. //#endif
  19. }
  20. }
  21. }
  22. #endif