diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-04 15:51:59 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-04 15:51:59 -0400 |
| commit | 67ad1db6b77b2c2cb6d81c22808d99564a5f3ebc (patch) | |
| tree | 680573c554a180eff4c06e40c9dd17556570eff9 /Emby.Common.Implementations/BaseApplicationHost.cs | |
| parent | 72aaecb27930e04aa356febf35db2372bc417166 (diff) | |
add environment info
Diffstat (limited to 'Emby.Common.Implementations/BaseApplicationHost.cs')
| -rw-r--r-- | Emby.Common.Implementations/BaseApplicationHost.cs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/Emby.Common.Implementations/BaseApplicationHost.cs b/Emby.Common.Implementations/BaseApplicationHost.cs index bdebe894e..9585abb2a 100644 --- a/Emby.Common.Implementations/BaseApplicationHost.cs +++ b/Emby.Common.Implementations/BaseApplicationHost.cs @@ -29,6 +29,7 @@ using MediaBrowser.Common.Extensions; using Emby.Common.Implementations.Cryptography; using Emby.Common.Implementations.Diagnostics; using Emby.Common.Implementations.Net; +using Emby.Common.Implementations.EnvironmentInfo; using Emby.Common.Implementations.Threading; using MediaBrowser.Common; using MediaBrowser.Common.IO; @@ -171,6 +172,8 @@ namespace Emby.Common.Implementations protected ICryptographyProvider CryptographyProvider = new CryptographyProvider(); + protected IEnvironmentInfo EnvironmentInfo = new Emby.Common.Implementations.EnvironmentInfo.EnvironmentInfo(); + private DeviceId _deviceId; public string SystemId { @@ -187,16 +190,7 @@ namespace Emby.Common.Implementations public virtual string OperatingSystemDisplayName { - get - { -#if NET46 - return Environment.OSVersion.VersionString; -#endif -#if NETSTANDARD1_6 - return System.Runtime.InteropServices.RuntimeInformation.OSDescription; -#endif - return "Operating System"; - } + get { return EnvironmentInfo.OperatingSystemName; } } public IMemoryStreamProvider MemoryStreamProvider { get; set; } @@ -216,7 +210,7 @@ namespace Emby.Common.Implementations // hack alert, until common can target .net core BaseExtensions.CryptographyProvider = CryptographyProvider; - XmlSerializer = new XmlSerializer(fileSystem, logManager.GetLogger("XmlSerializer")); + XmlSerializer = new MyXmlSerializer(fileSystem, logManager.GetLogger("XmlSerializer")); FailedAssemblies = new List<string>(); ApplicationPaths = applicationPaths; @@ -534,6 +528,7 @@ return null; RegisterSingleInstance(Logger); RegisterSingleInstance(TaskManager); + RegisterSingleInstance(EnvironmentInfo); RegisterSingleInstance(FileSystemManager); |
