mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-29 11:05:44 +00:00
24 lines
No EOL
659 B
C#
24 lines
No EOL
659 B
C#
using Microsoft.AspNet.SignalR;
|
|
using Microsoft.AspNet.SignalR.Infrastructure;
|
|
using NzbDrone.Core.Messaging;
|
|
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);
|
|
}
|
|
}
|
|
} |