// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Diagnostics.Contracts;
using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Hubs;
namespace System.Web.Http
{
///
/// Defines a base class for that exposes functionality for calling back
/// to clients connected to a particular SignalR hub.
///
/// The type of the hub. Must implement the interface.
[CLSCompliant(false)]
public abstract class HubController : HubControllerBase where THub : IHub
{
///
/// Gets the for the associated hub.
///
protected override IHubContext HubContext
{
get
{
Contract.Assert(ConnectionManager != null);
return ConnectionManager.GetHubContext();
}
}
}
}