public void Apply(IBusBuilder builder)
        {
            var receiveEndpointBuilder = new HttpReceiveEndpointBuilder(_host, CreateConsumePipe(builder), builder);

            var receivePipe = CreateReceivePipe(receiveEndpointBuilder);

            _sendEndpointProvider = CreateSendEndpointProvider(receiveEndpointBuilder);
            _publishEndpointProvider = CreatePublishEndpointProvider(receiveEndpointBuilder);

            var sendPipe = builder.CreateSendPipe();

            var receiveSettings = new Settings(_pathMatch, receiveEndpointBuilder.MessageSerializer, _sendEndpointProvider, _publishEndpointProvider);

            var transport = new HttpReceiveTransport(_host, receiveSettings, sendPipe);

            var httpHost = _host as HttpHost;
            if (httpHost == null)
                throw new ConfigurationException("Must be a HttpHost");

            httpHost.ReceiveEndpoints.Add(NewId.Next().ToString(), new ReceiveEndpoint(transport, receivePipe));
        }
Пример #2
0
        public void Apply(IBusBuilder builder)
        {
            var receiveEndpointBuilder = new HttpReceiveEndpointBuilder(_host, CreateConsumePipe(builder), builder);

            var receivePipe = CreateReceivePipe(receiveEndpointBuilder);

            _sendEndpointProvider    = CreateSendEndpointProvider(receiveEndpointBuilder);
            _publishEndpointProvider = CreatePublishEndpointProvider(receiveEndpointBuilder);

            var sendPipe = builder.CreateSendPipe();

            var receiveSettings = new Settings(_pathMatch, receiveEndpointBuilder.MessageSerializer, _sendEndpointProvider, _publishEndpointProvider);

            var transport = new HttpReceiveTransport(_host, receiveSettings, sendPipe);

            var httpHost = _host as HttpHost;

            if (httpHost == null)
            {
                throw new ConfigurationException("Must be a HttpHost");
            }

            httpHost.ReceiveEndpoints.Add(NewId.Next().ToString(), new ReceiveEndpoint(transport, receivePipe));
        }
Пример #3
0
 protected ISendPipe CreateSendPipe(params ISendPipeSpecification[] specifications)
 {
     return(_builder.CreateSendPipe(specifications));
 }