diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-08-17 16:19:02 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-08-17 16:19:02 -0400 |
| commit | a7dcf7191a71bfefd4a8c69d24d2eec53973bb83 (patch) | |
| tree | 6419c67eef23c5c86fe474448c5e9c78a2172b30 /Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs | |
| parent | a57c887f7f367402cd1e3e215a8b8052f3c603da (diff) | |
add fixes for .net core
Diffstat (limited to 'Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs')
| -rw-r--r-- | Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs b/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs index 0999fa141..f86279f37 100644 --- a/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs +++ b/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs @@ -6,16 +6,16 @@ namespace Emby.Server.Implementations.EnvironmentInfo { public class EnvironmentInfo : IEnvironmentInfo { - public Architecture? CustomArchitecture { get; set; } - public MediaBrowser.Model.System.OperatingSystem? CustomOperatingSystem { get; set; } + private Architecture? _customArchitecture; + private MediaBrowser.Model.System.OperatingSystem? _customOperatingSystem; public virtual MediaBrowser.Model.System.OperatingSystem OperatingSystem { get { - if (CustomOperatingSystem.HasValue) + if (_customOperatingSystem.HasValue) { - return CustomOperatingSystem.Value; + return _customOperatingSystem.Value; } switch (Environment.OSVersion.Platform) @@ -30,6 +30,10 @@ namespace Emby.Server.Implementations.EnvironmentInfo return MediaBrowser.Model.System.OperatingSystem.Windows; } + set + { + _customOperatingSystem = value; + } } public string OperatingSystemName @@ -60,13 +64,17 @@ namespace Emby.Server.Implementations.EnvironmentInfo { get { - if (CustomArchitecture.HasValue) + if (_customArchitecture.HasValue) { - return CustomArchitecture.Value; + return _customArchitecture.Value; } return Environment.Is64BitOperatingSystem ? MediaBrowser.Model.System.Architecture.X64 : MediaBrowser.Model.System.Architecture.X86; } + set + { + _customArchitecture = value; + } } public string GetEnvironmentVariable(string name) |
