public void Build(IHost host) { var builder = new ServiceBusReceiveEndpointBuilder(_hostConfiguration, this); ApplySpecifications(builder); var receiveEndpointContext = builder.CreateReceiveEndpointContext(); ClientPipeConfigurator.UseFilter(new ConfigureTopologyFilter <ReceiveSettings>(_settings, receiveEndpointContext.BrokerTopology, _settings.RemoveSubscriptions, _hostConfiguration.ConnectionContextSupervisor.Stopping)); CreateReceiveEndpoint(host, receiveEndpointContext); }
public IEventDataReceiver Build() { var result = BusConfigurationResult.CompileResults(Validate()); try { var builder = new ServiceBusReceiveEndpointBuilder(_hostConfiguration, _endpointConfiguration); foreach (var specification in Specifications) { specification.Configure(builder); } return(new EventDataReceiver(builder.CreateReceiveEndpointContext())); } catch (Exception ex) { throw new ConfigurationException(result, "An exception occurred creating the EventDataReceiver", ex); } }