Settings for the server are now combined with the settings from the SDK. This introduces a large breaking change and a migration should be created. This refactor utilizes .NET Configuration and the Options pattern. This will allow for the overriding of any setting using envionment variables. It also means that Settings.yml can be used to override any .NET configuration. A SettingsProvider implementation was created, and any updating of settings was changed from SettingsService.SaveSettings() to SettingsProvider.Update(s => { ... })
19 lines
No EOL
837 B
C#
19 lines
No EOL
837 B
C#
using LANCommander.Server.Settings.Enums;
|
|
|
|
namespace LANCommander.Server.Settings.Models;
|
|
|
|
public class LauncherSettings
|
|
{
|
|
public string StoragePath { get; set; } = "Launcher";
|
|
/// <summary>
|
|
/// Whether to include locally downloaded launcher files and provide these for download
|
|
/// </summary>
|
|
public bool HostUpdates { get; set; } = true;
|
|
/// <summary>
|
|
/// Whether to include online launcher files to link to for download
|
|
/// </summary>
|
|
public bool IncludeOnlineUpdates { get; set; } = false;
|
|
public string VersionOverride { get; set; } = String.Empty;
|
|
public IEnumerable<LauncherArchitecture> Architectures { get; set; } = new[] { LauncherArchitecture.x64, LauncherArchitecture.arm64 };
|
|
public IEnumerable<LauncherPlatform> Platforms { get; set; } = new[] { LauncherPlatform.Windows };
|
|
} |