コード例 #1
0
        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);
        }
コード例 #2
0
        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);
            }
        }