public void SetupApi() { query = ConfigurationHelpers.RabbitMqQueryWithConfigSettings(); connection = ConfigurationHelpers.ChannelWithAppConfigSettings(); var shortTermConnection = ConfigurationHelpers.FreshConnectionFromAppConfig(); router = new RabbitRouter(connection, shortTermConnection); }
public void SetupApi() { query = ConfigurationHelpers.RabbitMqQueryWithConfigSettings(); channelAction = ConfigurationHelpers.ChannelWithAppConfigSettings(); var shortTermConnection = ConfigurationHelpers.FreshConnectionFromAppConfig(); router = new RabbitRouter(channelAction, shortTermConnection); }
public void setup() { new MessagingBaseConfiguration() .WithDefaults() .WithConnection(ConfigurationHelpers.RabbitMqConnectionWithConfigSettings()); _conn = ObjectFactory.GetInstance<IChannelAction>(); }
private IChannelAction GetChannelActionSingleton() { if (_longConnectionSingleton == null) { _longConnectionSingleton = new LongTermRabbitConnection(Get <IRabbitMqConnection>()); } return(_longConnectionSingleton); }
public void setup() { var config = new MessagingBaseConfiguration() .WithDefaults() .WithConnection(ConfigurationHelpers.RabbitMqConnectionWithConfigSettings()); _conn = config.Get <IChannelAction>(); }
/// <summary> /// Create a new router from config settings /// </summary> public RabbitRouter(IChannelAction longTermConnection, IRabbitMqConnection shortTermConnection) { _lockObject = new object(); _longTermConnection = longTermConnection; _shortTermConnection = shortTermConnection; queues = new HashSet<string>(); exchanges = new HashSet<string>(); noOptions = new Dictionary<string, object>(); }
/// <summary> /// Create a new router from config settings /// </summary> public RabbitRouter(IChannelAction longTermConnection, IRabbitMqConnection shortTermConnection) { _lockObject = new object(); _longTermConnection = longTermConnection ?? throw new ArgumentNullException(nameof(longTermConnection)); _shortTermConnection = shortTermConnection ?? throw new ArgumentNullException(nameof(shortTermConnection)); queues = new HashSet <string>(); exchanges = new HashSet <string>(); noOptions = new Dictionary <string, object>(); }
public void a_set_of_configured_components_being_shut_down() { MessagingSystem.Control.Shutdown(); _receiverControl = Substitute.For<IReceiverControl>(); _channelAction = Substitute.For<IChannelAction>(); _sender = Substitute.For<ISenderNode>(); _rabbitConn = Substitute.For<IRabbitMqConnection>(); ObjectFactory.Configure(map => { map.For<IReceiverControl>().Use(_receiverControl); map.For<IChannelAction>().Use(_channelAction); map.For<ISenderNode>().Use(_sender); map.For<IRabbitMqConnection>().Use(_rabbitConn); }); MessagingSystem.Control.Shutdown(); }
/// <inheritdoc /> public ReducedPermissionRouter(IChannelAction longTermConnection, IRabbitMqConnection shortTermConnection) { _rabbit = new RabbitRouter(longTermConnection, shortTermConnection); }