Added SinaglR
This commit is contained in:
12
Server/Hubs/NotificationHub.cs
Normal file
12
Server/Hubs/NotificationHub.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using Barcode.Host.Shared.Models;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
|
||||
namespace Barcode.Host.Server.Hubs;
|
||||
|
||||
public class NotificationHub : Hub
|
||||
{
|
||||
|
||||
public async Task NotifyAll(Notification notification) =>
|
||||
await Clients.All.SendAsync(nameof(NotifyAll), notification);
|
||||
|
||||
}
|
Reference in New Issue
Block a user