refactor(uploader): drop members only tests used
Tests write serialized queue and watch-memory bytes directly; the app persists through its coalescing writer. Single-instance hand-over no longer returns an unused flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
8 files changed
+8
-24
No files matched your search
@@ -6,10 +6,7 @@ using Titano.Protocol;
|
||||
namespace Titano.Uploader.Server;
|
||||
|
||||
/// <summary>A Titano Server announced on the LAN.</summary>
|
||||
public sealed record DiscoveredServer(string Name, string Address)
|
||||
{
|
||||
public override string ToString() => Name + " · " + Address;
|
||||
}
|
||||
public sealed record DiscoveredServer(string Name, string Address);
|
||||
|
||||
/// <summary>
|
||||
/// Listens for the server's UDP beacon (<see cref="DiscoveryBeacon.Port"/>) while the connect form is open and reports
|
||||
@@ -31,17 +28,15 @@ public sealed class DiscoveryListener : IDisposable
|
||||
_ = Task.Run(() => ListenAsync(context, _cts.Token));
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
public void Dispose()
|
||||
{
|
||||
_cts?.Cancel();
|
||||
_cts?.Dispose();
|
||||
_cts = null;
|
||||
}
|
||||
|
||||
public void Dispose() => Stop();
|
||||
|
||||
/// <summary>The address the client should use for <paramref name="beacon"/> sent from <paramref name="sender"/>.</summary>
|
||||
public static string AddressOf(DiscoveryBeacon beacon, IPAddress sender)
|
||||
private static string AddressOf(DiscoveryBeacon beacon, IPAddress sender)
|
||||
{
|
||||
var host = sender.AddressFamily == AddressFamily.InterNetworkV6 ? "[" + sender + "]" : sender.ToString();
|
||||
return beacon.HttpsPort > 0 ? $"https://{host}:{beacon.HttpsPort}" : $"http://{host}:{beacon.HttpPort}";
|
||||
|
||||
Reference in new issue
Block a user