ISendTransport GetSendTransport(Uri address) { var host = _busConfiguration.GetHost(address); var settings = host.Topology.SendTopology.GetSendSettings(address); IAgent <SendEndpointContext> source = GetSendEndpointContextSource(host, settings, settings.GetBrokerTopology()); var transport = new ServiceBusSendTransport(source, address); host.Add(transport); return(transport); }
ISendTransport GetSendTransport <T>(Uri address) where T : class { var host = _busConfiguration.GetHost(address); var settings = _publishTopology.GetMessageTopology <T>().GetSendSettings(); IAgent <SendEndpointContext> source = GetSendEndpointContextSource(host, settings, settings.GetBrokerTopology()); var transport = new ServiceBusSendTransport(source, address); host.Add(transport); return(transport); }