namespace ElectronNET.API
{
using ElectronNET.AspNet.Hubs;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
///
/// Extension methods for mapping the Electron SignalR hub.
///
public static class ElectronEndpointRouteBuilderExtensions
{
///
/// Maps the Electron SignalR hub to the /electron-hub endpoint.
/// This is required when using SignalR-based startup modes.
///
/// The endpoint route builder.
/// The endpoint route builder for chaining.
public static IEndpointRouteBuilder MapElectronHub(this IEndpointRouteBuilder endpoints)
{
endpoints.MapHub("/electron-hub");
return endpoints;
}
}
}