diff --git a/Infrastructure/Messaging/MessagingDependencyInjection.cs b/Infrastructure/Messaging/MessagingDependencyInjection.cs index 4c2324f..59e9c11 100644 --- a/Infrastructure/Messaging/MessagingDependencyInjection.cs +++ b/Infrastructure/Messaging/MessagingDependencyInjection.cs @@ -18,7 +18,7 @@ namespace Musify.Infrastructure.Messaging ConfigureRabbitMqHost( busFactoryConfigurator, busRegistrationContext.GetRequiredService())); - }); + } ); return serviceDescriptors; } @@ -54,22 +54,22 @@ namespace Musify.Infrastructure.Messaging busFactoryConfigurator.ReceiveEndpoint(UpdatePlayListPictureConsumer.QueueName, endpointConfigurator => { endpointConfigurator.ConfigureConsumer(busRegistrationContext); - }); + } ); busFactoryConfigurator.ReceiveEndpoint(RemoveFileConsumer.QueueName, endpointConfigurator => { endpointConfigurator.ConfigureConsumer(busRegistrationContext); - }); + } ); busFactoryConfigurator.ReceiveEndpoint(TranscodeAudioFromTrackConsumer.QueueName, endpointConfigurator => { endpointConfigurator.ConfigureConsumer(busRegistrationContext); - }); + } ); busFactoryConfigurator.ReceiveEndpoint(UpdateTrackPictureConsumer.QueueName, endpointConfigurator => { endpointConfigurator.ConfigureConsumer(busRegistrationContext); - }); + } ); // Activity endpoints ConfigureExecuteActivityEndpoint( @@ -106,8 +106,8 @@ namespace Musify.Infrastructure.Messaging busFactoryConfigurator, busRegistrationContext, TransferFilesToBucket.ExecuteEndpointName); - }); - }); + } ); + } ); return serviceDescriptors; } @@ -120,7 +120,7 @@ namespace Musify.Infrastructure.Messaging { options.Username(massTransitConfiguration.Username); options.Password(massTransitConfiguration.Password); - }); + } ); } static void ConfigureExecuteActivityEndpoint( @@ -133,26 +133,7 @@ namespace Musify.Infrastructure.Messaging busFactoryConfigurator.ReceiveEndpoint($"{endpointName}_execute", endpointConfigurator => { endpointConfigurator.ExecuteActivityHost(busRegistrationContext); - }); - } - - static void ConfigureActivityEndpoints( - IRabbitMqBusFactoryConfigurator busFactoryConfigurator, - IBusRegistrationContext busRegistrationContext, - string endpointName) - where TActivity : class, IActivity - where TArguments : class - where TLog : class - { - busFactoryConfigurator.ReceiveEndpoint($"{endpointName}_execute", endpointConfigurator => - { - endpointConfigurator.ExecuteActivityHost(busRegistrationContext); - }); - - busFactoryConfigurator.ReceiveEndpoint($"{endpointName}_compensate", endpointConfigurator => - { - endpointConfigurator.CompensateActivityHost(busRegistrationContext); - }); + } ); } } } \ No newline at end of file