Kind: Service
Source: Pams/API/Pams.API/Pams.API.csproj (line 1)
Part of: Pams
NuGet package dependency
Microsoft.AspNet.SignalR.Core is a NuGet dependency in Pams.API.csproj that adds SignalR server APIs to the Pams API. It supports persistent client connections, hub-based messaging, and server-to-client notifications.
Diagram
mermaidsequenceDiagram participant Client participant SignalR as SignalR Hub participant API as Pams API Client->>SignalR: Connect to hub endpoint SignalR->>API: Invoke hub method API-->>SignalR: Return update SignalR-->>Client: Send notification
Usage
typescriptimport * as signalR from "@microsoft/signalr";
const connection = new signalR.HubConnectionBuilder()
.withUrl("/signalr/pams")
.build();
connection.on("statusChanged", (status: string) => {
console.log("Pams status changed:", status);
});
async function connectToPamsUpdates() {
await connection.start();
await connection.invoke("SubscribeToStatus");
}
connectToPamsUpdates().catch(console.error);
AI Coding Instructions
- Keep the
Microsoft.AspNet.SignalR.Corepackage reference inPams.API.csprojaligned with the SignalR APIs used by the API project. - Register SignalR routes and hub configuration in the API startup path before clients attempt to connect.
- Keep hub method names and client event names consistent between server code and JavaScript clients.
- Handle connection failures and reconnect behavior in clients that depend on hub notifications.
- Do not mix ASP.NET SignalR APIs with ASP.NET Core SignalR APIs unless the application migration path supports both.
Used by
1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Injected or called by (1)
Pams.API—Pams/API/Pams.API/Pams.API.csproj:1
Was this page helpful?