/// <summary>
        /// Initializes the endpoint configuration builder.
        /// </summary>
        /// <param name="endpointName">The name of the endpoint being configured.</param>
        public EndpointConfiguration(string endpointName)
            : base(new SettingsHolder())
        {
            ValidateEndpointName(endpointName);

            Settings.Set <StartupDiagnosticEntries>(new StartupDiagnosticEntries());

            Settings.Set("NServiceBus.Routing.EndpointName", endpointName);

            pipelineCollection = new PipelineConfiguration();
            Settings.Set <PipelineConfiguration>(pipelineCollection);
            Pipeline = new PipelineSettings(pipelineCollection.Modifications, Settings);

            Settings.Set <QueueBindings>(new QueueBindings());

            Settings.SetDefault("Endpoint.SendOnly", false);
            Settings.SetDefault("Transactions.IsolationLevel", IsolationLevel.ReadCommitted);
            Settings.SetDefault("Transactions.DefaultTimeout", TransactionManager.DefaultTimeout);

            Notifications = new Notifications();
            Settings.Set <Notifications>(Notifications);
            Settings.Set <NotificationSubscriptions>(new NotificationSubscriptions());

            conventionsBuilder = new ConventionsBuilder(Settings);
        }
Ejemplo n.º 2
0
 public StartableEndpoint(SettingsHolder settings, IBuilder builder, FeatureActivator featureActivator, PipelineConfiguration pipelineConfiguration, IReadOnlyCollection <IWantToRunWhenBusStartsAndStops> startables)
 {
     this.settings              = settings;
     this.builder               = builder;
     this.featureActivator      = featureActivator;
     this.pipelineConfiguration = pipelineConfiguration;
     this.startables            = startables;
 }
        public InitializableEndpoint(SettingsHolder settings, IContainer container, List<Action<IConfigureComponents>> registrations, PipelineSettings pipelineSettings, PipelineConfiguration pipelineConfiguration)
        {
            this.settings = settings;
            this.pipelineSettings = pipelineSettings;
            this.pipelineConfiguration = pipelineConfiguration;

            RegisterContainerAdapter(container);
            RunUserRegistrations(registrations);

            this.container.RegisterSingleton(this);
            this.container.RegisterSingleton<ReadOnlySettings>(settings);
        }
Ejemplo n.º 4
0
        public StartableEndpoint(SettingsHolder settings, IBuilder builder, FeatureActivator featureActivator, PipelineConfiguration pipelineConfiguration, IEventAggregator eventAggregator, TransportInfrastructure transportInfrastructure, CriticalError criticalError)
        {
            this.criticalError = criticalError;
            this.settings = settings;
            this.builder = builder;
            this.featureActivator = featureActivator;
            this.pipelineConfiguration = pipelineConfiguration;
            this.eventAggregator = eventAggregator;
            this.transportInfrastructure = transportInfrastructure;

            pipelineCache = new PipelineCache(builder, settings);

            messageSession = new MessageSession(new RootContext(builder, pipelineCache, eventAggregator));
        }
Ejemplo n.º 5
0
        public InitializableEndpoint(SettingsHolder settings,
                                     IContainer container,
                                     List <Action <IConfigureComponents> > registrations,
                                     PipelineSettings pipelineSettings,
                                     PipelineConfiguration pipelineConfiguration)
        {
            this.settings              = settings;
            this.pipelineSettings      = pipelineSettings;
            this.pipelineConfiguration = pipelineConfiguration;

            RegisterContainerAdapter(container);
            RunUserRegistrations(registrations);

            this.container.RegisterSingleton(this);
            this.container.RegisterSingleton <ReadOnlySettings>(settings);
        }
Ejemplo n.º 6
0
 public ReceiveComponent(ReceiveConfiguration configuration,
                         TransportReceiveInfrastructure receiveInfrastructure,
                         IPipelineCache pipelineCache,
                         PipelineConfiguration pipelineConfiguration,
                         IEventAggregator eventAggregator,
                         IBuilder builder,
                         CriticalError criticalError,
                         string errorQueue)
 {
     this.configuration         = configuration;
     this.receiveInfrastructure = receiveInfrastructure;
     this.pipelineCache         = pipelineCache;
     this.pipelineConfiguration = pipelineConfiguration;
     this.eventAggregator       = eventAggregator;
     this.builder       = builder;
     this.criticalError = criticalError;
     this.errorQueue    = errorQueue;
 }
Ejemplo n.º 7
0
        public StartableEndpoint(SettingsHolder settings, IBuilder builder, FeatureActivator featureActivator, PipelineConfiguration pipelineConfiguration, IEventAggregator eventAggregator, TransportInfrastructure transportInfrastructure, CriticalError criticalError)
        {
            this.criticalError           = criticalError;
            this.settings                = settings;
            this.builder                 = builder;
            this.featureActivator        = featureActivator;
            this.pipelineConfiguration   = pipelineConfiguration;
            this.eventAggregator         = eventAggregator;
            this.transportInfrastructure = transportInfrastructure;

            pipelineCache = new PipelineCache(builder, settings);

            messageSession = new MessageSession(new RootContext(builder, pipelineCache, eventAggregator));
        }
Ejemplo n.º 8
0
        public InitializableEndpoint(SettingsHolder settings, IContainer container, List <Action <IConfigureComponents> > registrations, PipelineSettings pipelineSettings, PipelineConfiguration pipelineConfiguration, IReadOnlyCollection <IWantToRunWhenBusStartsAndStops> startables)
        {
            this.settings              = settings;
            this.pipelineSettings      = pipelineSettings;
            this.pipelineConfiguration = pipelineConfiguration;
            this.startables            = startables;

            RegisterContainerAdapter(container);
            RunUserRegistrations(registrations);

            this.container.RegisterSingleton(this);
            this.container.RegisterSingleton <ReadOnlySettings>(settings);
        }