From 5fdb373f6267f5eef41e2335d67210367f6d35f5 Mon Sep 17 00:00:00 2001 From: Ebbe Knudsen Date: Tue, 19 Nov 2024 13:55:55 +0100 Subject: [PATCH] Update ProcessManagerServiceBusClientsOptions --- .../Extensions/DependencyInjection/ClientExtensions.cs | 4 ++-- .../Options/ProcessManagerServiceBusClientsOptions.cs | 2 +- .../BRS_026_028/V1/RequestCalculatedDataClientV1.cs | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/ProcessManager.Client/Extensions/DependencyInjection/ClientExtensions.cs b/source/ProcessManager.Client/Extensions/DependencyInjection/ClientExtensions.cs index ae702bd620..b229f6ddb0 100644 --- a/source/ProcessManager.Client/Extensions/DependencyInjection/ClientExtensions.cs +++ b/source/ProcessManager.Client/Extensions/DependencyInjection/ClientExtensions.cs @@ -79,11 +79,11 @@ public static IServiceCollection AddProcessManagerRequestCalculatedDataClient(th var serviceBusOptions = provider.GetRequiredService>().Value; var serviceBusSender = provider .GetRequiredService() - .CreateSender(serviceBusOptions.ProcessManagerTopic); + .CreateSender(serviceBusOptions.TopicName); return serviceBusSender; }) - .WithName(nameof(ProcessManagerServiceBusClientsOptions.ProcessManagerTopic)); + .WithName(nameof(ProcessManagerServiceBusClientsOptions.TopicName)); }); services.AddScoped(); diff --git a/source/ProcessManager.Client/Extensions/Options/ProcessManagerServiceBusClientsOptions.cs b/source/ProcessManager.Client/Extensions/Options/ProcessManagerServiceBusClientsOptions.cs index 72b90c9010..62ac7f483b 100644 --- a/source/ProcessManager.Client/Extensions/Options/ProcessManagerServiceBusClientsOptions.cs +++ b/source/ProcessManager.Client/Extensions/Options/ProcessManagerServiceBusClientsOptions.cs @@ -28,5 +28,5 @@ public class ProcessManagerServiceBusClientsOptions /// Name of the topic which the Process Manager receives service bus messages on /// [Required] - public string ProcessManagerTopic { get; set; } = string.Empty; + public string TopicName { get; set; } = string.Empty; } diff --git a/source/ProcessManager.Client/Processes/BRS_026_028/V1/RequestCalculatedDataClientV1.cs b/source/ProcessManager.Client/Processes/BRS_026_028/V1/RequestCalculatedDataClientV1.cs index 0365a0506b..1168476f96 100644 --- a/source/ProcessManager.Client/Processes/BRS_026_028/V1/RequestCalculatedDataClientV1.cs +++ b/source/ProcessManager.Client/Processes/BRS_026_028/V1/RequestCalculatedDataClientV1.cs @@ -25,9 +25,10 @@ namespace Energinet.DataHub.ProcessManager.Client.Processes.BRS_026_028.V1; public class RequestCalculatedDataClientV1( - IAzureClientFactory serviceBusFactory) : IRequestCalculatedDataClientV1 + IAzureClientFactory serviceBusFactory) + : IRequestCalculatedDataClientV1 { - private readonly ServiceBusSender _serviceBusSender = serviceBusFactory.CreateClient(nameof(ProcessManagerServiceBusClientsOptions.ProcessManagerTopic)); + private readonly ServiceBusSender _serviceBusSender = serviceBusFactory.CreateClient(nameof(ProcessManagerServiceBusClientsOptions.TopicName)); public async Task RequestCalculatedEnergyTimeSeriesAsync(RequestCalculatedDataInputV1 input, CancellationToken cancellationToken) {