docs+ui: backfill XML doc comments and finish dashboard layout pass
Adds missing <summary>/<param> XML docs across 99 server, worker, and test files so CommentChecker reports zero issues (TreatWarningsAsErrors needs the analyzer clean). Bundles in WIP dashboard work: NavSection extraction, MainLayout/site.css/js styling alignment, and DashboardOptions/Auth tweaks.
This commit is contained in:
@@ -110,6 +110,7 @@ public sealed class DashboardSnapshotPublisherTests
|
||||
|
||||
private sealed class ThrowOnceThenYieldSnapshotService : IDashboardSnapshotService
|
||||
{
|
||||
/// <summary>Gets the number of subscription attempts.</summary>
|
||||
public int SubscribeCount { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -120,13 +121,17 @@ public sealed class DashboardSnapshotPublisherTests
|
||||
/// </summary>
|
||||
public DateTimeOffset? FirstThrowAt { get; private set; }
|
||||
|
||||
/// <summary>Gets the wall-clock instant of the second subscription attempt.</summary>
|
||||
public DateTimeOffset? SecondSubscribeAt { get; private set; }
|
||||
|
||||
/// <summary>Gets the current snapshot.</summary>
|
||||
public DashboardSnapshot GetSnapshot()
|
||||
{
|
||||
return null!;
|
||||
}
|
||||
|
||||
/// <summary>Watches for snapshot changes and yields them asynchronously.</summary>
|
||||
/// <param name="cancellationToken">Token to observe for cancellation.</param>
|
||||
public async IAsyncEnumerable<DashboardSnapshot> WatchSnapshotsAsync(
|
||||
[EnumeratorCancellation] CancellationToken cancellationToken)
|
||||
{
|
||||
@@ -159,13 +164,17 @@ public sealed class DashboardSnapshotPublisherTests
|
||||
|
||||
private sealed class CompleteImmediatelySnapshotService : IDashboardSnapshotService
|
||||
{
|
||||
/// <summary>Gets the number of subscription attempts.</summary>
|
||||
public int SubscribeCount { get; private set; }
|
||||
|
||||
/// <summary>Gets the current snapshot.</summary>
|
||||
public DashboardSnapshot GetSnapshot()
|
||||
{
|
||||
return null!;
|
||||
}
|
||||
|
||||
/// <summary>Watches for snapshot changes and completes immediately.</summary>
|
||||
/// <param name="cancellationToken">Token to observe for cancellation.</param>
|
||||
#pragma warning disable CS1998 // async without await — IAsyncEnumerable contract requires async signature
|
||||
public async IAsyncEnumerable<DashboardSnapshot> WatchSnapshotsAsync(
|
||||
[EnumeratorCancellation] CancellationToken cancellationToken)
|
||||
@@ -182,24 +191,55 @@ public sealed class DashboardSnapshotPublisherTests
|
||||
{
|
||||
private readonly RecordingHubClients _clients = new();
|
||||
|
||||
/// <summary>Gets the hub clients.</summary>
|
||||
public IHubClients Clients => _clients;
|
||||
|
||||
/// <summary>Gets the group manager.</summary>
|
||||
public IGroupManager Groups { get; } = new NoopGroupManager();
|
||||
|
||||
/// <summary>Gets the number of send calls recorded.</summary>
|
||||
public int SendCount => _clients.AllProxy.SendCount;
|
||||
}
|
||||
|
||||
private sealed class RecordingHubClients : IHubClients
|
||||
{
|
||||
/// <summary>Gets the recording client proxy for all clients.</summary>
|
||||
public RecordingClientProxy AllProxy { get; } = new();
|
||||
|
||||
/// <summary>Gets a client proxy targeting all clients.</summary>
|
||||
public IClientProxy All => AllProxy;
|
||||
|
||||
/// <summary>Gets a client proxy excluding specified connections.</summary>
|
||||
/// <param name="excludedConnectionIds">Connection identifiers to exclude.</param>
|
||||
public IClientProxy AllExcept(IReadOnlyList<string> excludedConnectionIds) => AllProxy;
|
||||
|
||||
/// <summary>Gets a client proxy for a specific connection.</summary>
|
||||
/// <param name="connectionId">The connection identifier.</param>
|
||||
public IClientProxy Client(string connectionId) => AllProxy;
|
||||
|
||||
/// <summary>Gets a client proxy for specified connections.</summary>
|
||||
/// <param name="connectionIds">The connection identifiers.</param>
|
||||
public IClientProxy Clients(IReadOnlyList<string> connectionIds) => AllProxy;
|
||||
|
||||
/// <summary>Gets a client proxy for a group.</summary>
|
||||
/// <param name="groupName">The group name.</param>
|
||||
public IClientProxy Group(string groupName) => AllProxy;
|
||||
|
||||
/// <summary>Gets a client proxy for a group excluding specified connections.</summary>
|
||||
/// <param name="groupName">The group name.</param>
|
||||
/// <param name="excludedConnectionIds">Connection identifiers to exclude.</param>
|
||||
public IClientProxy GroupExcept(string groupName, IReadOnlyList<string> excludedConnectionIds) => AllProxy;
|
||||
|
||||
/// <summary>Gets a client proxy for specified groups.</summary>
|
||||
/// <param name="groupNames">The group names.</param>
|
||||
public IClientProxy Groups(IReadOnlyList<string> groupNames) => AllProxy;
|
||||
|
||||
/// <summary>Gets a client proxy for a specific user.</summary>
|
||||
/// <param name="userId">The user identifier.</param>
|
||||
public IClientProxy User(string userId) => AllProxy;
|
||||
|
||||
/// <summary>Gets a client proxy for specified users.</summary>
|
||||
/// <param name="userIds">The user identifiers.</param>
|
||||
public IClientProxy Users(IReadOnlyList<string> userIds) => AllProxy;
|
||||
}
|
||||
|
||||
@@ -207,8 +247,13 @@ public sealed class DashboardSnapshotPublisherTests
|
||||
{
|
||||
private int _sendCount;
|
||||
|
||||
/// <summary>Gets the number of send calls recorded.</summary>
|
||||
public int SendCount => Volatile.Read(ref _sendCount);
|
||||
|
||||
/// <summary>Records a send call and completes asynchronously.</summary>
|
||||
/// <param name="method">The SignalR method name.</param>
|
||||
/// <param name="args">The method arguments.</param>
|
||||
/// <param name="cancellationToken">Token to observe for cancellation.</param>
|
||||
public Task SendCoreAsync(string method, object?[] args, CancellationToken cancellationToken = default)
|
||||
{
|
||||
Interlocked.Increment(ref _sendCount);
|
||||
@@ -218,9 +263,17 @@ public sealed class DashboardSnapshotPublisherTests
|
||||
|
||||
private sealed class NoopGroupManager : IGroupManager
|
||||
{
|
||||
/// <summary>Completes immediately without performing group addition.</summary>
|
||||
/// <param name="connectionId">The connection identifier.</param>
|
||||
/// <param name="groupName">The group name.</param>
|
||||
/// <param name="cancellationToken">Token to observe for cancellation.</param>
|
||||
public Task AddToGroupAsync(string connectionId, string groupName, CancellationToken cancellationToken = default)
|
||||
=> Task.CompletedTask;
|
||||
|
||||
/// <summary>Completes immediately without performing group removal.</summary>
|
||||
/// <param name="connectionId">The connection identifier.</param>
|
||||
/// <param name="groupName">The group name.</param>
|
||||
/// <param name="cancellationToken">Token to observe for cancellation.</param>
|
||||
public Task RemoveFromGroupAsync(string connectionId, string groupName, CancellationToken cancellationToken = default)
|
||||
=> Task.CompletedTask;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user