// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. using System.Collections.Generic; using System.Collections.Specialized; using System.Security.Principal; namespace Microsoft.AspNet.SignalR.Hubs { public class HubCallerContext { /// /// Gets the connection id of the calling client. /// public string ConnectionId { get; private set; } /// /// Gets the cookies for the request. /// public IDictionary RequestCookies { get { return Request.Cookies; } } /// /// Gets the headers for the request. /// public NameValueCollection Headers { get { return Request.Headers; } } /// /// Gets the querystring for the request. /// public NameValueCollection QueryString { get { return Request.QueryString; } } /// /// Gets the for the request. /// public IPrincipal User { get { return Request.User; } } /// /// Gets the for the current HTTP request. /// public IRequest Request { get; private set; } public HubCallerContext(IRequest request, string connectionId) { ConnectionId = connectionId; Request = request; } } }