refactor(publisher)!: simplify AddMessagingServicePublisher registration
Replace the MessagingServicePublisherConfiguration builder with plain overloads that accept either a configuration delegate or IConfiguration. Update EmailSender and the publisher integration test to the new API, and mark the static EmailSender obsolete ahead of the new client. BREAKING CHANGE: AddMessagingServicePublisher no longer accepts a builder configuration delegate.
This commit is contained in:
@@ -24,7 +24,7 @@ public sealed class SendingEmailPublisherTests : IAsyncDisposable
|
||||
{
|
||||
var services = new ServiceCollection();
|
||||
services.AddLogging();
|
||||
services.AddMessagingServicePublisher(cfg => cfg.AddRabbitMqConnectionFactory(RabbitMqTestConfig.Apply));
|
||||
services.AddMessagingServicePublisher(RabbitMqTestConfig.Apply);
|
||||
|
||||
_serviceProvider = services.BuildServiceProvider();
|
||||
_publisher = _serviceProvider.GetRequiredService<ISendingEmailPublisher>();
|
||||
|
||||
Reference in New Issue
Block a user