refactor: remove duplicated client, geometry and desktop code

Share the nest server client setup and page validation, entity endpoints,
post marker checks and the repeated desktop list, cut-time and busy-warning
code. Persistence tests use NestArchiveJson. No behavior change intended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-10-31 22:13:26 -04:00
1 parent 31525ba342
commit 082a50bbcd
25 files changed
+249 -482

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
namespace OpenNest.Data;
/// <summary>The connection every nest server client holds: its HTTP client and the server's base address.</summary>
public abstract class NestServerClient : IDisposable
{
private protected readonly HttpClient _httpClient;
private readonly bool _ownsClient;
private readonly Uri _baseUri;
private protected NestServerClient(HttpClient httpClient, string baseUrl, bool ownsClient)
{
_httpClient = httpClient;
_ownsClient = ownsClient;
_baseUri = ServerUrl.ParseBase(baseUrl, nameof(baseUrl));
}
private protected Uri Url(string relative) => new(_baseUri, relative);
public void Dispose()
{
if (_ownsClient)
_httpClient.Dispose();
}
}