< Summary

Information
Class: NexusLabs.Needlr.SignalR.GeneratedSignalRHubRegistration
Assembly: NexusLabs.Needlr.SignalR
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.SignalR/GeneratedSignalRHubRegistrationPlugin.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 53
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
DocumentationPlaceholder()100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.SignalR/GeneratedSignalRHubRegistrationPlugin.cs

#LineLine coverage
 1using Microsoft.AspNetCore.Builder;
 2using Microsoft.Extensions.Logging;
 3
 4using NexusLabs.Needlr.AspNet;
 5
 6namespace NexusLabs.Needlr.SignalR;
 7
 8/// <summary>
 9/// Marker interface for source-generated SignalR hub registration.
 10/// </summary>
 11/// <remarks>
 12/// When using source generation, the generator emits a
 13/// <c>SignalRHubRegistrations.MapGeneratedHubs(WebApplication)</c> extension method
 14/// that can be called directly in your Program.cs:
 15/// <code>
 16/// var app = builder.Build();
 17/// app.MapGeneratedHubs(); // Generated at compile-time
 18/// </code>
 19///
 20/// This approach is preferred for AOT/trimmed applications because it avoids
 21/// all runtime reflection. The <see cref="SignalRHubRegistrationPlugin"/> uses
 22/// reflection and is marked with appropriate AOT warnings.
 23///
 24/// To enable hub registration generation, implement <see cref="IHubRegistrationPlugin"/>
 25/// with compile-time constant property values:
 26/// <code>
 27/// public class ChatHubPlugin : IHubRegistrationPlugin
 28/// {
 29///     public string HubPath => "/chat";
 30///     public Type HubType => typeof(ChatHub);
 31/// }
 32/// </code>
 33/// </remarks>
 34public static class GeneratedSignalRHubRegistration
 35{
 36    /// <summary>
 37    /// Extension method placeholder that provides documentation for source-generated hub registration.
 38    /// The actual implementation is generated by NexusLabs.Needlr.Generators when
 39    /// IHubRegistrationPlugin implementations are discovered.
 40    /// </summary>
 41    /// <remarks>
 42    /// This method exists to provide IntelliSense documentation. The generated
 43    /// <c>NexusLabs.Needlr.Generated.SignalRHubRegistrations.MapGeneratedHubs()</c>
 44    /// extension method should be called instead.
 45    /// </remarks>
 46    public static void DocumentationPlaceholder()
 47    {
 48        // This method is intentionally empty.
 49        // It exists only for documentation purposes.
 50        // The actual MapGeneratedHubs() method is source-generated.
 151    }
 52}
 53

Methods/Properties

DocumentationPlaceholder()