コード例 #1
0
        public RabbitMqCommandBus(IMessagePublisher messagePublisher, CommandBusRabbitMqOptions options)
        {
            this.channel = options.Channel;
            this.options = options;

            options.MessagePublisher = messagePublisher;
        }
コード例 #2
0
        public static void UseRabbitMqCommandBus(this ShriekOptionBuilder builder, Action <RabbitMqOptions> optionAction)
        {
            var option = new CommandBusRabbitMqOptions();

            optionAction(option);

            AddRabbitMq(builder, option);

            builder.Services.AddTransient <ICommandBus, RabbitMqCommandBus>();
        }