Exemplo n.º 1
0
        /// <summary>
        /// Configure and create an in-memory bus
        /// </summary>
        /// <param name="configure">The configuration callback to configure the bus</param>
        /// <returns></returns>
        public static IBusControl Create(Action<IInMemoryBusFactoryConfigurator> configure)
        {
            var configurator = new InMemoryBusFactoryConfigurator();

            configure(configurator);

            return configurator.Build();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Configure and create an in-memory bus
        /// </summary>
        /// <param name="baseAddress">Override the default base address</param>
        /// <param name="configure">The configuration callback to configure the bus</param>
        /// <returns></returns>
        public static IBusControl Create(Uri baseAddress, Action <IInMemoryBusFactoryConfigurator> configure)
        {
            var configurator = new InMemoryBusFactoryConfigurator(CreateEndpointConfiguration(), baseAddress);

            configure(configurator);

            return(configurator.Build());
        }
Exemplo n.º 3
0
        /// <summary>
        /// Configure and create an in-memory bus
        /// </summary>
        /// <param name="configure">The configuration callback to configure the bus</param>
        /// <returns></returns>
        public static IBusControl Create(Action <IInMemoryBusFactoryConfigurator> configure)
        {
            var configurator = new InMemoryBusFactoryConfigurator();

            configure(configurator);

            return(configurator.Build());
        }
Exemplo n.º 4
0
        /// <summary>
        /// Configure and create an in-memory bus
        /// </summary>
        /// <param name="baseAddress">Override the default base address</param>
        /// <param name="configure">The configuration callback to configure the bus</param>
        /// <returns></returns>
        public static IBusControl Create(Uri baseAddress, Action <IInMemoryBusFactoryConfigurator> configure)
        {
            var topologyConfiguration = new InMemoryTopologyConfiguration(MessageTopology);
            var busConfiguration      = new InMemoryBusConfiguration(topologyConfiguration, baseAddress);

            var configurator = new InMemoryBusFactoryConfigurator(busConfiguration);

            configure(configurator);

            return(configurator.Build());
        }
Exemplo n.º 5
0
        protected override IBusControl CreateBus()
        {
            var configurator = new InMemoryBusFactoryConfigurator(_busConfiguration);

            ConfigureBus(configurator);

            ConfigureInMemoryBus(configurator);

            configurator.ReceiveEndpoint(InputQueueName, e =>
            {
                ConfigureReceiveEndpoint(e);

                ConfigureInMemoryReceiveEndpoint(e);
            });
            return(configurator.Build(_busConfiguration, _specifications ?? Enumerable.Empty <ISpecification>()));
        }
Exemplo n.º 6
0
        public override IBusInstance CreateBus(IBusRegistrationContext context, IEnumerable <IBusInstanceSpecification> specifications)
        {
            var configurator = new InMemoryBusFactoryConfigurator(_busConfiguration);

            return(CreateBus(configurator, context, _configure, specifications));
        }
Exemplo n.º 7
0
 /// <summary>
 /// c'tor
 /// </summary>
 public BusTestScenarioBuilder()
 {
     Timeout       = TimeSpan.FromSeconds(30);
     _configurator = new InMemoryBusFactoryConfigurator();
 }
 /// <summary>
 /// c'tor
 /// </summary>
 public BusTestScenarioBuilder()
 {
     Timeout = TimeSpan.FromSeconds(30);
     _configurator = new InMemoryBusFactoryConfigurator();
 }