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 messageSerializationRegister = new MessageSerializationRegister(config.MessageSubjectProvider); var justSayingBus = new JustSayingBus(config, messageSerializationRegister, 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()) .WithSerializationFactory(new NewtonsoftSerializationFactory()); 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 amazonQueueCreator = new AmazonQueueCreator(); var bus = new JustSayingFluently(justSayingBus, amazonQueueCreator); 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 {Region = region}; config.Validate(); var bus = new JustSayingFluently(new JustSayingBus(config, new MessageSerialisationRegister()), new AmazonQueueCreator()); bus.WithMonitoring(new NullOpMessageMonitor()); bus.WithSerialisationFactory(new NewtonsoftSerialisationFactory()); return bus; }
public static IMayWantOptionalSettings InRegion(string region) { var config = new MessagingConfig { Region = region }; config.Validate(); var bus = new JustSayingFluently(new JustSayingBus(config, new MessageSerialisationRegister()), new AmazonQueueCreator()); bus.WithMonitoring(new NullOpMessageMonitor()); bus.WithSerialisationFactory(new NewtonsoftSerialisationFactory()); return(bus); }