public Task <ISendTransport> CreateSendTransport(Uri address, ReceiveEndpointContext receiveEndpointContext)
        {
            var clientContextSupervisor = new HttpClientContextSupervisor(receiveEndpointContext.ReceivePipe);

            var sendSettings = address.GetSendSettings();

            var transport = new HttpSendTransport(clientContextSupervisor, sendSettings, receiveEndpointContext);

            _host.Add(transport);

            return(Task.FromResult <ISendTransport>(transport));
        }
Example #2
0
        public Task <ISendTransport> GetSendTransport(Uri address)
        {
            if (!_busConfiguration.Hosts.TryGetHost(address, out var hostConfiguration))
            {
                throw new EndpointNotFoundException($"The host was not found for the specified address: {address}");
            }

            var clientContextSupervisor = new HttpClientContextSupervisor(_receivePipe);

            var sendSettings = address.GetSendSettings();

            return(Task.FromResult <ISendTransport>(new HttpSendTransport(clientContextSupervisor, sendSettings, _receiveEndpointContext)));
        }