diff options
| author | Cody Robibero <cody@robibe.ro> | 2023-11-15 16:35:14 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-15 16:35:14 -0700 |
| commit | 6d1abf67c36379f0b061095619147a3691841e21 (patch) | |
| tree | 510a271453b8ff2b82cfd5676f2ec8ea76c233ad /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | 350df4a617d4c9f350ec0a356aedf7ec8944d155 (diff) | |
| parent | 5fa1b8ac3a7e65f0972e4fc55e83172f66efd794 (diff) | |
Merge pull request #10463 from jellyfin/dotnet8
Update to .NET 8
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 40aee063eb..4540ab205a 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -99,6 +99,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Prometheus.DotNetRuntime; using static MediaBrowser.Controller.Extensions.ConfigurationExtensions; +using IConfigurationManager = MediaBrowser.Common.Configuration.IConfigurationManager; using WebSocketManager = Emby.Server.Implementations.HttpServer.WebSocketManager; namespace Emby.Server.Implementations @@ -309,7 +310,9 @@ namespace Emby.Server.Implementations { _creatingInstances.Add(type); Logger.LogDebug("Creating instance of {Type}", type); - return ActivatorUtilities.CreateInstance(ServiceProvider, type); + return ServiceProvider is null + ? Activator.CreateInstance(type) + : ActivatorUtilities.CreateInstance(ServiceProvider, type); } catch (Exception ex) { |
