|
|
|
@ -5,17 +5,11 @@ namespace System.Runtime |
|
|
|
{ |
|
|
|
public class OSPlatformProvider : IOSPlatformProvider, ITransientDependency |
|
|
|
{ |
|
|
|
public OSPlatform GetCurrentOSPlatform() |
|
|
|
public virtual OSPlatform GetCurrentOSPlatform() |
|
|
|
{ |
|
|
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) |
|
|
|
{ |
|
|
|
//MAC
|
|
|
|
return OSPlatform.OSX; |
|
|
|
} |
|
|
|
|
|
|
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) |
|
|
|
{ |
|
|
|
return OSPlatform.Linux; |
|
|
|
return OSPlatform.OSX; //MAC
|
|
|
|
} |
|
|
|
|
|
|
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) |
|
|
|
@ -23,7 +17,7 @@ namespace System.Runtime |
|
|
|
return OSPlatform.Windows; |
|
|
|
} |
|
|
|
|
|
|
|
throw new Exception("Cannot determine operating system!"); |
|
|
|
return OSPlatform.Linux; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|