コード例 #1
0
ファイル: RabbitBus.cs プロジェクト: ehramovich/Contour
        /// <summary>
        /// The build senders.
        /// </summary>
        private void BuildSenders()
        {
            this.ProducerRegistry = new ProducerRegistry(this);

            this.Configuration.SenderConfigurations.ForEach(
                c =>
            {
                var sender = new RabbitSender(this.Configuration.Endpoint, c, this.ProducerRegistry, this.Configuration.Filters.ToList());
                this.ComponentTracker.Register(sender);
            });
        }
コード例 #2
0
ファイル: RabbitBus.cs プロジェクト: Sliborskii/Contour
        /// <summary>
        /// Registers a sender using <paramref name="configuration"/>
        /// </summary>
        /// <param name="configuration">
        /// Sender configuration
        /// </param>
        /// <returns>
        /// The <see cref="RabbitSender"/>.
        /// </returns>
        public RabbitSender RegisterSender(ISenderConfiguration configuration)
        {
            this.logger.Trace(
                $"Registering a new sender of [{configuration.Label}] with connection string [{configuration.Options.GetConnectionString()}]");

            var sender = new RabbitSender(this, configuration, this.connectionPool, this.Configuration.Filters.ToList());

            this.ComponentTracker.Register(sender);

            this.logger.Trace(
                $"A sender of [{configuration.Label}] with connection string [{configuration.Options.GetConnectionString()}] registered successfully");

            return(sender);
        }
コード例 #3
0
ファイル: RabbitBus.cs プロジェクト: mzabolotko/Contour
        /// <summary>
        /// The build senders.
        /// </summary>
        private void BuildSenders()
        {
            this.ProducerRegistry = new ProducerRegistry(this);

            this.Configuration.SenderConfigurations.ForEach(
                c =>
                    {
                        var sender = new RabbitSender(this.Configuration.Endpoint, c, this.ProducerRegistry, this.Configuration.Filters.ToList());
                        this.ComponentTracker.Register(sender);
                    });
        }