Example #1
0
        internal override IPublisher OnCreatePublisher(PublisherConfigurator configuration)
        {
            if (_channelFactory == null)
            {
                object[] parameters = CreateParameters(configuration.BufferManager);

                _channelFactory = _binding.BuildChannelFactory <IOutputChannel>(parameters);

                _channelFactory.Open();
            }

            Uri toAddress = CreateUri();

            IKnownContractCollector collector = new KnownContractCollector();

            IOutputChannel outputChannel = _channelFactory.CreateChannel(new EndpointAddress(toAddress));

            return(new Publisher(outputChannel, _binding.MessageVersion, collector, BusId));
        }
Example #2
0
        internal override IPublisher OnCreatePublisher(PublisherConfigurator configuration)
        {
            if (_channelFactory == null)
            {
                object[] parameters = CreateParameters(configuration.BufferManager);

                _channelFactory = _binding.BuildChannelFactory<IOutputChannel>(parameters);

                _channelFactory.Open();
            }

            Uri toAddress = CreateUri();

            IKnownContractCollector collector = new KnownContractCollector();

            IOutputChannel outputChannel = _channelFactory.CreateChannel(new EndpointAddress(toAddress));

            return new Publisher(outputChannel, _binding.MessageVersion, collector, BusId);
        }