< Summary

Information
Class: NexusLabs.Needlr.SignalR.GeneratedSignalRHubRegistration
Assembly: NexusLabs.Needlr.SignalR
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.SignalR/GeneratedSignalRHubRegistration.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/GeneratedSignalRHubRegistration.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
 22/// <see cref="SignalRExtensions.UseSignalRHubsWithReflection"/> extension is the
 23/// explicit reflection-based alternative and carries the appropriate AOT warnings.
 24///
 25/// To enable hub registration generation, implement <see cref="IHubRegistrationPlugin"/>
 26/// with compile-time constant property values:
 27/// <code>
 28/// public class ChatHubPlugin : IHubRegistrationPlugin
 29/// {
 30///     public string HubPath => "/chat";
 31///     public Type HubType => typeof(ChatHub);
 32/// }
 33/// </code>
 34/// </remarks>
 35public static class GeneratedSignalRHubRegistration
 36{
 37    /// <summary>
 38    /// Extension method placeholder that provides documentation for source-generated hub registration.
 39    /// The actual implementation is generated by NexusLabs.Needlr.Generators when
 40    /// IHubRegistrationPlugin implementations are discovered.
 41    /// </summary>
 42    /// <remarks>
 43    /// This method exists to provide IntelliSense documentation. The generated
 44    /// <c>NexusLabs.Needlr.Generated.SignalRHubRegistrations.MapGeneratedHubs()</c>
 45    /// extension method should be called instead.
 46    /// </remarks>
 47    public static void DocumentationPlaceholder()
 48    {
 49        // This method is intentionally empty.
 50        // It exists only for documentation purposes.
 51        // The actual MapGeneratedHubs() method is source-generated.
 152    }
 53}

Methods/Properties

DocumentationPlaceholder()