public DefaultHubTypeResolver(IHubLocator hubLocator) { if (hubLocator == null) { throw new ArgumentNullException("hubLocator"); } BuildCache(hubLocator); }
public HubDispatcher(IHubFactory hubFactory, IMessageStore store, Signaler signaler, IActionResolver actionResolver, IJavaScriptProxyGenerator proxyGenerator, IJsonStringifier jsonStringifier, IHubLocator hubLocator, string url) : base(signaler, store, jsonStringifier) { _hubFactory = hubFactory; _store = store; _signaler = signaler; _actionResolver = actionResolver; _proxyGenerator = proxyGenerator; _hubLocator = hubLocator; _url = VirtualPathUtility.ToAbsolute(url); }
public HubDispatcher(IHubFactory hubFactory, IMessageStore store, Signaler signaler, IClientIdFactory clientIdFactory, IActionResolver actionResolver, IJavaScriptProxyGenerator proxyGenerator, IJsonStringifier jsonStringifier, IHubLocator hubLocator, string url) : base(signaler, clientIdFactory, store, jsonStringifier) { _hubFactory = hubFactory; _store = store; _signaler = signaler; _actionResolver = actionResolver; _proxyGenerator = proxyGenerator; _hubLocator = hubLocator; _url = VirtualPathUtility.ToAbsolute(url); }
private void BuildCache(IHubLocator hubLocator) { foreach (var hubType in hubLocator.GetHubs()) { // Always cache by full name AddCacheKey(hubType.FullName, hubType); // If there's a hub name attribute then use it as an alternative name var hubName = ReflectionHelper.GetAttributeValue <HubNameAttribute, string>(hubType, a => a.HubName); // Don't add it if it's the same as the short name if (!String.Equals(hubName, hubType.Name, StringComparison.OrdinalIgnoreCase)) { AddCacheKey(hubName, hubType); } // Add an entry for the type's short name AddCacheKey(hubType.Name, hubType); } }
private void BuildCache(IHubLocator hubLocator) { foreach (var hubType in hubLocator.GetHubs()) { // Always cache by full name AddCacheKey(hubType.FullName, hubType); // If there's a hub name attribute then use it as an alternative name var hubName = ReflectionHelper.GetAttributeValue<HubNameAttribute, string>(hubType, a => a.HubName); // Don't add it if it's the same as the short name if (!String.Equals(hubName, hubType.Name, StringComparison.OrdinalIgnoreCase)) { AddCacheKey(hubName, hubType); } // Add an entry for the type's short name AddCacheKey(hubType.Name, hubType); } }
public HubDispatcher(IHubFactory hubFactory, IMessageStore store, Signaler signaler, IConnectionIdFactory connectionIdFactory, IActionResolver actionResolver, IJavaScriptProxyGenerator proxyGenerator, IJsonSerializer jsonSerializer, IHubLocator hubLocator, IHubTypeResolver hubTypeResolver, string url) : base(signaler, connectionIdFactory, store, jsonSerializer) { _hubFactory = hubFactory; _store = store; _jsonSerializer = jsonSerializer; _signaler = signaler; _actionResolver = actionResolver; _proxyGenerator = proxyGenerator; _hubLocator = hubLocator; _hubTypeResolver = hubTypeResolver; _url = url; }
public DefaultJavaScriptProxyGenerator(IHubLocator hubLocator, IJavaScriptMinifier javascriptMinifier) { _hubLocator = hubLocator; _javascriptMinifier = javascriptMinifier; }