1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 17:47:08 +00:00
Lidarr/NzbDrone.SignalR/NzbDronePersistentConnection.cs
2013-09-11 17:42:53 -07:00

23 lines
No EOL
619 B
C#

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