public IBusConfiguration AddModule(IIntegrationModule module)
 {
     ThrowIfFinished();
     if (module == null)
     {
         throw new ArgumentNullException("module");
     }
     return(AddConfigurator(x => module.RegisterEndpoints(x)));
 }
Esempio n. 2
0
 public MessagingConfiguration(IIntegrationModule module, int consumersCount = 1, bool clearAllQueues = false)
 {
     if (module == null)
     {
         throw new ArgumentNullException(nameof(module));
     }
     _module         = module;
     _consumersCount = consumersCount;
     _clearAllQueues = clearAllQueues;
     _listeners      = new Dictionary <IIntegrationModule, IMessagingConfigurationListener>();
     _configurations = new Dictionary <Type, ListenerConfiguration>();
 }
Esempio n. 3
0
        protected Startup(IHostingEnvironment env, bool useMessaging = false, IIntegrationModule module = null)
        {
            _useMessaging = useMessaging;
            _module       = module;

            var builder = new ConfigurationBuilder()
                          .SetBasePath(env.ContentRootPath)
                          .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                          .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
                          .AddEnvironmentVariables();

            Configuration = builder.Build();
        }
Esempio n. 4
0
 protected Startup(IConfiguration configuration, bool useMessaging = false, IIntegrationModule module = null)
 {
     _useMessaging = useMessaging;
     _module       = module;
     Configuration = configuration;
 }