1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-27 01:57:21 +00:00
Lidarr/NzbDrone.SignalR/NzbDronePersistentConnection.cs

24 lines
659 B
C#
Raw Normal View History

2013-09-11 06:33:47 +00:00
using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Infrastructure;
using NzbDrone.Core.Messaging;
using NzbDrone.Core.Messaging.Commands;
2013-09-11 06:33:47 +00:00
namespace NzbDrone.SignalR
{
public sealed class NzbDronePersistentConnection : PersistentConnection, IExecute<BroadcastSignalRMessage>
{
private IPersistentConnectionContext Context
{
get
{
return ((ConnectionManager)GlobalHost.ConnectionManager).GetConnection(GetType());
}
}
public void Execute(BroadcastSignalRMessage message)
{
Context.Connection.Broadcast(message.Body);
}
}
}