/
IConnectionManager.cs
31 lines (28 loc) · 1.3 KB
/
IConnectionManager.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using SignalR.Hubs;
namespace SignalR
{
/// <summary>
/// Provides access to hubs and persistent connections references.
/// </summary>
public interface IConnectionManager
{
/// <summary>
/// Returns a <see cref="IHubContext"/> for the specified <see cref="IHub"/>.
/// </summary>
/// <typeparam name="T">Type of the <see cref="IHub"/></typeparam>
/// <returns>a <see cref="IHubContext"/> for the specified <see cref="IHub"/></returns>
IHubContext GetHubContext<T>() where T : IHub;
/// <summary>
/// Returns a <see cref="IHubContext"/>for the specified hub.
/// </summary>
/// <param name="hubName">Name of the hub</param>
/// <returns>a <see cref="IHubContext"/> for the specified hub</returns>
IHubContext GetHubContext(string hubName);
/// <summary>
/// Returns a <see cref="IPersistentConnectionContext"/> for the <see cref="PersistentConnection"/>.
/// </summary>
/// <typeparam name="T">Type of the <see cref="PersistentConnection"/></typeparam>
/// <returns>A <see cref="IPersistentConnectionContext"/> for the <see cref="PersistentConnection"/>.</returns>
IPersistentConnectionContext GetConnectionContext<T>() where T : PersistentConnection;
}
}