public Task Invoke(IDictionary <string, object> env) { var path = Get <string>(env, OwinConstants.RequestPath); if (path == null || !path.StartsWith(_path, StringComparison.OrdinalIgnoreCase)) { return(_app.Invoke(env)); } var pathBase = Get <string>(env, OwinConstants.RequestPathBase); var dispatcher = new HubDispatcher(pathBase + _path); var handler = new CallHandler(_resolver.Invoke(), dispatcher); return(handler.Invoke(env)); }
public Task Invoke(IDictionary <string, object> env) { var path = Get <string>(env, OwinConstants.RequestPath); if (path == null || !path.StartsWith(_path, StringComparison.OrdinalIgnoreCase)) { return(_app.Invoke(env)); } var resolver = _resolver.Invoke(); var connectionFactory = new PersistentConnectionFactory(resolver); var connection = connectionFactory.CreateInstance(_connectionType); var handler = new CallHandler(resolver, connection); return(handler.Invoke(env)); }