Open amielc1 opened 3 months ago
Add Extention method for IServiceCollection (in the project we write how to add our class into the IOC container, in the runner project -> program.cs we invoke this extention method )
for example :
> public static void AddMessageBrokerProducerServicesRabbitMq(this IServiceCollection services, > RabbitMqConfiguration rabbitMqConfiguration) > { > services.AddSingleton<IPublisher, Publisher>(); > services.AddSingleton(_ => new RabbitMqBuilderAdapter(rabbitMqConfiguration)); > services.AddSingleton<IProducerAdapter, RabbitMqProducerAdapter>(); > }
Add Extention method for IServiceCollection (in the project we write how to add our class into the IOC container, in the runner project -> program.cs we invoke this extention method )
for example :