public static IAsbOptions UseAzureServiceBusInOneWayClientMode(this RebusTransportConfigurer configurer, string connectionString) { IAsbOptions asbOptionsToReturn; if (ShouldEmulateAzureEnvironment(connectionString)) { var sender = MsmqMessageQueue.Sender(); configurer.UseSender(sender); asbOptionsToReturn = new NoopAsbOptions(); } else { var sender = AzureServiceBusMessageQueue.Sender(connectionString); configurer.UseSender(sender); asbOptionsToReturn = new AsbOptions(sender); } var gag = new OneWayClientGag(); configurer.UseReceiver(gag); configurer.UseErrorTracker(gag); return(asbOptionsToReturn); }
public static IAsbOptions UseAzureServiceBusInOneWayClientMode(this RebusTransportConfigurer configurer, string connectionString) { IAsbOptions asbOptionsToReturn; if (ShouldEmulateAzureEnvironment(connectionString)) { var sender = MsmqMessageQueue.Sender(); configurer.UseSender(sender); asbOptionsToReturn = new NoopAsbOptions(); } else { var sender = AzureServiceBusMessageQueue.Sender(connectionString); configurer.UseSender(sender); asbOptionsToReturn = new AsbOptions(sender); } var gag = new OneWayClientGag(); configurer.UseReceiver(gag); configurer.UseErrorTracker(gag); return asbOptionsToReturn; }