예제 #1
0
        public static IRevoConfiguration UseRebus(this IRevoConfiguration configuration,
                                                  RebusConnectionConfiguration connection           = null,
                                                  Action <RebusConfigurationSection> advancedAction = null)
        {
            var section = configuration.GetSection <RebusConfigurationSection>();

            section.IsActive   = true;
            section.Connection = connection ?? section.Connection;

            advancedAction?.Invoke(section);

            configuration.ConfigureKernel(c =>
            {
                if (section.IsActive)
                {
                    c.LoadModule(new RebusModule(section.Connection));
                }
            });

            return(configuration);
        }
예제 #2
0
 public RebusModule(RebusConnectionConfiguration connectionConfiguration)
 {
     this.connectionConfiguration = connectionConfiguration;
 }