/// <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(); }
/// <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()); }
/// <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()); }
/// <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()); }
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>())); }
public override IBusInstance CreateBus(IBusRegistrationContext context, IEnumerable <IBusInstanceSpecification> specifications) { var configurator = new InMemoryBusFactoryConfigurator(_busConfiguration); return(CreateBus(configurator, context, _configure, specifications)); }
/// <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(); }