Split Settings into model, serializer, paths and store

698 lines did all of it at once. The mutable CaptureFromUi callback becomes an
ISettingsCapture the settings view implements.
This commit is contained in:
maj00r
2026-09-04 21:13:06 +02:00
parent 8e5fe01104
commit 3c502f630d
30 changed files with 1371 additions and 779 deletions

View File

@@ -0,0 +1,20 @@
namespace StarterNG.Application.Abstractions;
/// <summary>
/// The bits of the host machine the starter has to ask about: which operating
/// system it is on, and where that system keeps per-user configuration.
/// </summary>
public interface IEnvironment
{
bool IsWindows { get; }
bool IsLinux { get; }
bool IsMacOS { get; }
/// <summary>An environment variable, or null when it is not set.</summary>
string? GetVariable(string name);
/// <summary>The folder the starter's own executable lives in.</summary>
string BaseDirectory { get; }
}

View File

@@ -58,4 +58,10 @@ public interface IFileSystem
IReadOnlyList<string> GetFilesRecursive(string path, string searchPattern);
DateTime GetLastWriteTimeUtc(string path);
/// <summary>
/// Whether the file carries an execute bit. Always true on Windows, where
/// executability is a property of the file's contents rather than its mode.
/// </summary>
bool IsExecutable(string path);
}