protected EndpointTestFixture() { var defaultSettings = new EndpointFactoryDefaultSettings(); _endpointFactoryConfigurator = new EndpointFactoryConfiguratorImpl(defaultSettings); _endpointFactoryConfigurator.AddTransportFactory <TTransportFactory>(); _endpointFactoryConfigurator.SetPurgeOnStartup(true); }
/// <summary> /// c'tor that sets up the endpoint configurator, its default settings, /// and uses the class type parameter <see cref="TTransportFactory"/> /// as the transport for that endpoint. /// </summary> protected EndpointTestFixture() { Buses = new List <IServiceBus>(); var defaultSettings = new EndpointFactoryDefaultSettings(); EndpointFactoryConfigurator = new EndpointFactoryConfiguratorImpl(defaultSettings); EndpointFactoryConfigurator.AddTransportFactory <TTransportFactory>(); EndpointFactoryConfigurator.SetPurgeOnStartup(true); }
protected ActivityTestFixture(Uri baseUri) { BaseUri = baseUri; var defaultSettings = new EndpointFactoryDefaultSettings(); _endpointFactoryConfigurator = new EndpointFactoryConfiguratorImpl(defaultSettings); _endpointFactoryConfigurator.SetPurgeOnStartup(true); ActivityTestContexts = new Dictionary <Type, ActivityTestContext>(); }
public static IEndpointCache New([NotNull] Action <EndpointFactoryConfigurator> configure) { Guard.AgainstNull(configure, "configure"); var configurator = new EndpointFactoryConfiguratorImpl(_defaultSettings); configure(configurator); ConfigurationResult result = ConfigurationResultImpl.CompileResults(configurator.Validate()); try { IEndpointFactory endpointFactory = configurator.CreateEndpointFactory(); IEndpointCache endpointCache = new EndpointCache(endpointFactory); return(endpointCache); } catch (Exception ex) { throw new ConfigurationException(result, "An exception was thrown during endpoint cache creation", ex); } }
public static IEndpointCache New([NotNull] Action<EndpointFactoryConfigurator> configure) { Guard.AgainstNull(configure, "configure"); var configurator = new EndpointFactoryConfiguratorImpl(_defaultSettings); configure(configurator); ConfigurationResult result = ConfigurationResultImpl.CompileResults(configurator.Validate()); try { IEndpointFactory endpointFactory = configurator.CreateEndpointFactory(); IEndpointCache endpointCache = new EndpointCache(endpointFactory); return endpointCache; } catch (Exception ex) { throw new ConfigurationException(result, "An exception was thrown during endpoint cache creation", ex); } }