src/Common/FileMessagingConfig.cs
/// <summary>
/// Gets an instance for the informed queue's broker configuration
/// </summary>
Gets an instance for the informed queue's broker configuration
Gets an instance for the informed queue ' s broker configuration
private IBrokerConfig GetTransporterConfigInstance(string queueName, out string brokerName)
        {
            var brokerList = _messagingConfig.BrokerList;
            BrokerConfigCollection broker;
            var queue = _messagingConfig.QueueList[queueName];
            if (queue != null)
            {
                brokerName = queue.Broker;
                broker = brokerList[brokerName] ?? throw new ArgumentException($"The broker with name \"{brokerName}\" could not be found.");
            }
            else
            {
                brokerName = brokerList.Default;
                broker = brokerList[brokerName] ?? throw new ArgumentException($"The default broker's configuration with name \"{brokerName}\" could not be found.");
                _messagingConfig.QueueList.Add(new QueueConfigElement(queueName, brokerName));
            }
            var configs = broker.GetEnumerable().ToDictionary(key => key.Key, value => value.Value, StringComparer.OrdinalIgnoreCase);
            return (IBrokerConfig)Activator.CreateInstance(broker.BrokerType, new object[] { configs });
        }
private IBrokerConfig GetTransporterConfigInstance ( string queueName , out string brokerName ) { var brokerList = _messagingConfig . BrokerList ; BrokerConfigCollection broker ; var queue = _messagingConfig . QueueList [ queueName ] ; if ( queue != null ) { brokerName = queue . Broker ; broker = brokerList [ brokerName ] ?? throw new ArgumentException ( $" The broker with name  \" { brokerName } \"  could not be found. " ) ; } else { brokerName = brokerList . Default ; broker = brokerList [ brokerName ] ?? throw new ArgumentException ( $" The default broker's configuration with name  \" { brokerName } \"  could not be found. " ) ; _messagingConfig . QueueList . Add ( new QueueConfigElement ( queueName , brokerName ) ) ; } var configs = broker . GetEnumerable ( ) . ToDictionary ( key => key . Key , value => value . Value , StringComparer . OrdinalIgnoreCase ) ; return ( IBrokerConfig ) Activator . CreateInstance ( broker . BrokerType , new object [ ] { configs } ) ; }
Gets an instance for the informed queue's broker configuration
Gets an instance for the informed queue ' s broker configuration
// If queue doesn't exist, uses default 
queueName
string
string
out