public HubContext(Func <string, ClientHubInvocation, IEnumerable <string>, Task> send, string hubName, IConnection connection) { _send = send; _hubName = hubName; _connection = connection; Clients = new ClientProxy(send, hubName); }
public HubContext(Func<string, ClientHubInvocation, IEnumerable<string>, Task> send, string hubName, IConnection connection) { _send = send; _hubName = hubName; _connection = connection; Clients = new ClientProxy(send, hubName); }
public TestableDebugHub(Mock<IContext> mockDbContext) : base(mockDbContext.Object) { const string connectionId = "1234"; const string hubName = "debug"; var mockConn = new Mock<IConnection>(); var mockUser = new Mock<IPrincipal>(); var mockCookies = new Mock<IRequestCookieCollection>(); var mockRequest = new Mock<IRequest>(); mockRequest.Setup(r => r.User).Returns(mockUser.Object); mockRequest.Setup(r => r.Cookies).Returns(mockCookies.Object); Clients = new ClientProxy(mockConn.Object, hubName); Groups = new GroupManager(mockConn.Object, hubName); Context = new HubCallerContext(mockRequest.Object, connectionId); var trackingDict = new TrackingDictionary(); Caller = new StatefulSignalProxy(mockConn.Object, connectionId, hubName, trackingDict); }