public AmqpEventEmitter(IOptions <AmqpOptions> amqpOptions) { this.rabbitOptions = amqpOptions.Value; connectionFactory = new ConnectionFactory(); connectionFactory.UserName = rabbitOptions.Username; connectionFactory.Password = rabbitOptions.Password; connectionFactory.VirtualHost = rabbitOptions.VirtualHost; connectionFactory.HostName = rabbitOptions.HostName; connectionFactory.Uri = new Uri(rabbitOptions.Uri); }
public AmqpEventEmitter(IOptions <AmqpOptions> options) { amqpOptions = options.Value; connectionFactory = new ConnectionFactory { UserName = amqpOptions.UserName, Password = amqpOptions.Password, VirtualHost = amqpOptions.VirtualHost, HostName = amqpOptions.HostName, Uri = new Uri(amqpOptions.Uri) }; }
public AmqpConnectionFactory( ILogger <AmqpConnectionFactory> logger, IOptions <AmqpOptions> serviceOptions) : base() { this.amqpOptions = serviceOptions.Value; this.UserName = amqpOptions.Username; this.Password = amqpOptions.Password; this.VirtualHost = amqpOptions.VirtualHost; this.HostName = amqpOptions.HostName; this.Uri = new Uri(amqpOptions.Uri); logger.LogInformation($"AMQP Connection configured for URI : {amqpOptions.Uri}"); }
public TestController(IOptionsSnapshot <AmqpOptions> options) { _amqpOptions = options.Value; }