Exemplo n.º 1
0
        public HubConnection Build()
        {
            if (_connectionFactoryDelegate == null)
            {
                throw new InvalidOperationException("Cannot create IConnection instance. The connection factory was not configured.");
            }

            IHubConnectionBuilder builder = this;

            var loggerFactory = builder.GetLoggerFactory();
            var hubProtocol   = builder.GetHubProtocol();

            return(new HubConnection(_connectionFactoryDelegate, hubProtocol ?? new JsonHubProtocol(), loggerFactory));
        }