public static IMayWantOptionalSettings InRegions(params string[] regions) { var config = new MessagingConfig(); if (regions != null) { foreach (var region in regions) { config.Regions.Add(region); } } config.Validate(); var messageSerialisationRegister = new MessageSerialisationRegister(); var justSayingBus = new JustSayingBus(config, messageSerialisationRegister); var amazonQueueCreator = new AmazonQueueCreator(); var bus = new JustSayingFluently(justSayingBus, amazonQueueCreator); bus .WithMonitoring(new NullOpMessageMonitor()) .WithSerialisationFactory(new NewtonsoftSerialisationFactory()); return(bus); }
public static IMayWantOptionalSettings InRegions(this JustSayingFluentlyDependencies dependencies, IEnumerable <string> regions) { var config = new MessagingConfig(); if (dependencies.MessageSubjectProvider != null) { config.MessageSubjectProvider = dependencies.MessageSubjectProvider; } if (regions != null) { foreach (var region in regions) { config.Regions.Add(region); } } config.Validate(); var messageSerialisationRegister = new MessageSerialisationRegister(config.MessageSubjectProvider); var justSayingBus = new JustSayingBus(config, messageSerialisationRegister, dependencies.LoggerFactory); var awsClientFactoryProxy = new AwsClientFactoryProxy(() => CreateMeABus.DefaultClientFactory()); var amazonQueueCreator = new AmazonQueueCreator(awsClientFactoryProxy, dependencies.LoggerFactory); var bus = new JustSayingFluently(justSayingBus, amazonQueueCreator, awsClientFactoryProxy, dependencies.LoggerFactory); bus .WithMonitoring(new NullOpMessageMonitor()) .WithSerialisationFactory(new NewtonsoftSerialisationFactory()); return(bus); }
public static IMayWantOptionalSettings InRegions(params string[] regions) { var config = new MessagingConfig(); if (regions != null) foreach (var region in regions) { config.Regions.Add(region); } config.Validate(); var messageSerialisationRegister = new MessageSerialisationRegister(); var justSayingBus = new JustSayingBus(config, messageSerialisationRegister); var awsClientFactoryProxy = new AwsClientFactoryProxy(() => DefaultClientFactory()); var amazonQueueCreator = new AmazonQueueCreator(awsClientFactoryProxy); var bus = new JustSayingFluently(justSayingBus, amazonQueueCreator, awsClientFactoryProxy); bus .WithMonitoring(new NullOpMessageMonitor()) .WithSerialisationFactory(new NewtonsoftSerialisationFactory()); return bus; }
public static IMayWantOptionalSettings InRegion(string region) { var config = new MessagingConfig(); config.Regions.Add(region); config.Validate(); var messageSerialisationRegister = new MessageSerialisationRegister(); var justSayingBus = new JustSayingBus(config, messageSerialisationRegister); var amazonQueueCreator = new AmazonQueueCreator(); var bus = new JustSayingFluently(justSayingBus, amazonQueueCreator); bus .WithMonitoring(new NullOpMessageMonitor()) .WithSerialisationFactory(new NewtonsoftSerialisationFactory()); return bus; }