From 63538bc19ab2061249f84898b7c3572472472729 Mon Sep 17 00:00:00 2001 From: andy Date: Sun, 31 Oct 2021 19:55:00 +0000 Subject: [PATCH] add skeleton NowPlayingHub --- Selector.Web/Hubs/NowPlayingHub.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Selector.Web/Hubs/NowPlayingHub.cs diff --git a/Selector.Web/Hubs/NowPlayingHub.cs b/Selector.Web/Hubs/NowPlayingHub.cs new file mode 100644 index 0000000..2d349af --- /dev/null +++ b/Selector.Web/Hubs/NowPlayingHub.cs @@ -0,0 +1,21 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.SignalR; + +using Selector.Cache; + +namespace Selector.Web.Hubs +{ + public interface INowPlayingHubClient + { + public Task OnNewPlaying(CurrentlyPlayingDTO context); + } + + public class NowPlayingHub: Hub + { + public Task SendNewPlaying(CurrentlyPlayingDTO context) + { + return Clients.All.OnNewPlaying(context); + } + } +} \ No newline at end of file