Add initial project structure including React, Vite, TailwindCSS, and Syncfusion dependencies. Configure tooling with ESLint, TypeScript, and Tailwind plugins. Set up `.gitignore`, Syncfusion themes, and example components for demonstration purposes.
14 lines
418 B
C#
14 lines
418 B
C#
using Microsoft.AspNetCore.SignalR;
|
|
|
|
namespace Api.SignalR
|
|
{
|
|
public class UserProvider : IUserIdProvider
|
|
{
|
|
public string GetUserId(HubConnectionContext connection)
|
|
{
|
|
// Extract the "userId" query parameter from the HTTP context.
|
|
var httpContext = connection.GetHttpContext();
|
|
return httpContext?.Request.Query["userId"].FirstOrDefault();
|
|
}
|
|
}
|
|
} |