public Task <ISendTransport> GetSendTransport(Uri address) { var sendSettings = address.GetSendSettings(); var host = _hosts.GetHost(address); var clientCache = new HttpClientCache(host.Supervisor, _receivePipe); return(Task.FromResult <ISendTransport>(new HttpSendTransport(clientCache, sendSettings, _receiveObserver, _topology))); }
public Task<ISendTransport> GetSendTransport(Uri address) { var sendSettings = address.GetSendSettings(); var host = _hosts.GetHosts(address).FirstOrDefault(); if (host == null) throw new EndpointNotFoundException("The endpoint address specified an unknown host: " + address); var clientCache = new HttpClientCache(_hosts[0].Supervisor, _receivePipe); return Task.FromResult<ISendTransport>(new HttpSendTransport(clientCache, sendSettings, _receiveObserver)); }
public Task <ISendTransport> GetSendTransport(Uri address) { var sendSettings = address.GetSendSettings(); var host = _hosts.GetHosts(address).FirstOrDefault(); if (host == null) { throw new EndpointNotFoundException("The endpoint address specified an unknown host: " + address); } var clientCache = new HttpClientCache(_hosts[0].Supervisor, _receivePipe); return(Task.FromResult <ISendTransport>(new HttpSendTransport(clientCache, sendSettings, _receiveObserver))); }