Ejemplo n.º 1
0
        public override BusTestScenario Build()
        {
            IEndpointFactory endpointFactory = BuildEndpointFactory();

            var scenario = new BusTestScenarioImpl(endpointFactory);

            _configurator.ChangeSettings(x => { x.EndpointCache = scenario.EndpointCache; });
            _configurator.EnableMessageTracing();

            scenario.Bus = _configurator.CreateServiceBus();

            return(scenario);
        }
Ejemplo n.º 2
0
        public static IServiceBus New([NotNull] Action <ServiceBusConfigurator> configure)
        {
            Guard.AgainstNull(configure, "configure");

            var configurator = new ServiceBusConfiguratorImpl(_defaultSettings);

            configurator.EnableMessageTracing();

            configure(configurator);

            var result = ConfigurationResultImpl.CompileResults(configurator.Validate());

            try
            {
                return(configurator.CreateServiceBus());
            }
            catch (Exception ex)
            {
                throw new ConfigurationException(result, "An exception was thrown during service bus creation", ex);
            }
        }
Ejemplo n.º 3
0
		public static IServiceBus New([NotNull] Action<ServiceBusConfigurator> configure)
		{
			Guard.AgainstNull(configure, "configure");

			var configurator = new ServiceBusConfiguratorImpl(_defaultSettings);

			configurator.EnableMessageTracing();

			configure(configurator);

			var result = ConfigurationResultImpl.CompileResults(configurator.Validate());

			try
			{
				return configurator.CreateServiceBus();
			}
			catch (Exception ex)
			{
				throw new ConfigurationException(result, "An exception was thrown during service bus creation", ex);
			}
		}