**Initialize React Vite project with basic setup**
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.
This commit is contained in:
@@ -12,16 +12,16 @@ namespace Api.SignalR
|
||||
while (!stoppingToken.IsCancellationRequested)
|
||||
{
|
||||
// For example, wait 10 seconds between messages.
|
||||
await Task.Delay(TimeSpan.FromSeconds(10), stoppingToken);
|
||||
await Task.Delay(TimeSpan.FromSeconds(2), stoppingToken);
|
||||
|
||||
// Log or do any work here.
|
||||
logger.LogInformation("Background service sending message at: {Time}", DateTime.Now);
|
||||
|
||||
// Send a message to all connected clients.
|
||||
await hubContext.Clients.All.SendAsync(
|
||||
await hubContext.Clients.User("user1234").SendAsync(
|
||||
"ReceiveMessage", // This is the client method name.
|
||||
"Background Service", // Example sender.
|
||||
"Hello from the background task!", // The message.
|
||||
$"Hello from the background task at {DateTime.Now:F}", // The message.
|
||||
stoppingToken);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user