コード例 #1
0
        public Connection Get(IConfiguration configuration, string serviceName)
        {
            var info = serviceName == null
              ? configuration.GetSingletonServiceInfo <RabbitMQServiceInfo>()
              : configuration.GetRequiredServiceInfo <RabbitMQServiceInfo>(serviceName);

            var rabbitConfig = new RabbitMQProviderConnectorOptions(configuration);
            var configurer   = new RabbitMQProviderConfigurer();

            return(new Connection
            {
                ConnectionString = configurer.Configure(info, rabbitConfig),
                Name = "RabbitMQ" + serviceName?.Insert(0, "-")
            });
        }
コード例 #2
0
 public virtual string CreateConnectionString()
 {
     return(_configurer.Configure(_info, _config));
 }