mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-30 23:45:46 +02:00
broke up EnvironmentProvider into different services
This commit is contained in:
36
NzbDrone.Common/EnvironmentInfo/OsInfo.cs
Normal file
36
NzbDrone.Common/EnvironmentInfo/OsInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
|
||||
namespace NzbDrone.Common.EnvironmentInfo
|
||||
{
|
||||
public static class OsInfo
|
||||
{
|
||||
|
||||
public static Version Version
|
||||
{
|
||||
get
|
||||
{
|
||||
OperatingSystem os = Environment.OSVersion;
|
||||
Version version = os.Version;
|
||||
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsMono
|
||||
{
|
||||
get
|
||||
{
|
||||
return Type.GetType("Mono.Runtime") != null;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsLinux
|
||||
{
|
||||
get
|
||||
{
|
||||
int p = (int)Environment.OSVersion.Platform;
|
||||
return (p == 4) || (p == 6) || (p == 128);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user