Write settings, presets and favourites whole or not at all

A failed write leaves the old file in place. Settings that could not be read
are not saved over. UI exceptions reach the log. Started from a shortcut set
up elsewhere, the starter moves to its own folder when only that one holds a
game.
This commit is contained in:
maj00r
2026-11-01 16:06:15 +01:00
parent 6948b13503
commit 07987a60a9
16 changed files with 1017 additions and 90 deletions

View File

@@ -0,0 +1,12 @@
using StarterNG.Application.Abstractions;
using StarterNG.Infrastructure.Adapters;
namespace StarterNG.Tests.Fakes;
/// <summary>The diagnostics log for a test that only wants one to write to or read back.</summary>
public static class TestLog
{
/// <param name="files">Where the log file goes; a disk of its own when left out.</param>
public static FileDiagnosticsLog Over(IFileSystem? files = null) =>
new(files ?? new InMemoryFileSystem(), new FixedClock(new DateTime(2026, 10, 13)), new GamePaths("game"));
}