Guest User

Untitled

a guest
Mar 20th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public string GetPlatformSpecificTask()
  2. {
  3.  
  4. var path = "unknown";
  5.  
  6. #if __MOBILE__
  7. //Android or iOS specific code
  8. #endif
  9.  
  10. #if WINDOWS_PHONE
  11. path = "windowsphone";
  12. #else
  13.  
  14. #if __SILVERLIGHT__
  15. path = "silverlight";
  16. #else
  17.  
  18. #if __ANDROID__
  19. path = "android";
  20. #else
  21.  
  22. #if __ANDROID_16__
  23. //Android specific code for SDK 16 or newer
  24. #endif
  25.  
  26. #if __IOS__
  27. path = "iOS";
  28. #else
  29.  
  30. #if __TVOS__
  31. path = "tv";
  32. #else
  33.  
  34. #if __WATCHOS__
  35. path = "watch";
  36. #endif
  37.  
  38. return path;
  39. }
Add Comment
Please, Sign In to add comment