Esempio n. 1
0
        public static void RegisterMessagesClient(this IServiceCollection services, IConfiguration configuration)
        {
            var rabbitMqConfiguration = new RabbitMqConfiguration();

            configuration.Bind("RabbitMq", rabbitMqConfiguration);

            services.AddSingleton(rabbitMqConfiguration);
            services.AddSingleton <IMessageClientFactory, MessageClientFactory>();
        }
 public MessageClientFactory(RabbitMqConfiguration rabbitMqConfiguration)
 {
     _rabbitMqConfiguration = rabbitMqConfiguration;
 }