diff --git a/src/Tgstation.Server.Host/Components/Engine/DelegatingEngineInstaller.cs b/src/Tgstation.Server.Host/Components/Engine/DelegatingEngineInstaller.cs index c7c5363a95..1157dff565 100644 --- a/src/Tgstation.Server.Host/Components/Engine/DelegatingEngineInstaller.cs +++ b/src/Tgstation.Server.Host/Components/Engine/DelegatingEngineInstaller.cs @@ -1,5 +1,5 @@ using System; -using System.Collections.Generic; +using System.Collections.Frozen; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -15,15 +15,15 @@ namespace Tgstation.Server.Host.Components.Engine sealed class DelegatingEngineInstaller : IEngineInstaller { /// - /// The mapping s to their appropriate . + /// The mapping s to their appropriate . /// - readonly IReadOnlyDictionary delegatedInstallers; + readonly FrozenDictionary delegatedInstallers; /// /// Initializes a new instance of the class. /// /// The value of . - public DelegatingEngineInstaller(IReadOnlyDictionary delegatedInstallers) + public DelegatingEngineInstaller(FrozenDictionary delegatedInstallers) { this.delegatedInstallers = delegatedInstallers ?? throw new ArgumentNullException(nameof(delegatedInstallers)); } diff --git a/src/Tgstation.Server.Host/Core/Application.cs b/src/Tgstation.Server.Host/Core/Application.cs index 202b098d7c..3b80d9da38 100644 --- a/src/Tgstation.Server.Host/Core/Application.cs +++ b/src/Tgstation.Server.Host/Core/Application.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Frozen; using System.Collections.Generic; using System.Globalization; using System.Threading.Tasks; @@ -380,12 +381,13 @@ namespace Tgstation.Server.Host.Core openDreamRepositoryDirectory), new NoopEventConsumer())); - services.AddSingleton>( + services.AddSingleton( serviceProvider => new Dictionary { { EngineType.Byond, serviceProvider.GetRequiredService() }, { EngineType.OpenDream, serviceProvider.GetRequiredService() }, - }); + } + .ToFrozenDictionary()); services.AddSingleton(); if (postSetupServices.InternalConfiguration.UsingSystemD)