1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 12:32:31 +01:00
Radarr/NzbDrone.SignalR/NzbDronePersistentConnection.cs
2013-09-18 17:25:45 -07:00

23 lines
628 B
C#

using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Infrastructure;
using NzbDrone.Core.Messaging.Commands;
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);
}
}
}