From 80530787e30fe113100f816da5e3e2ba9f663f4c Mon Sep 17 00:00:00 2001 From: John Simons Date: Wed, 12 Feb 2025 10:29:25 +1000 Subject: [PATCH] Check args for different transport type --- src/Billing/Properties/launchSettings.json | 8 -------- src/ClientUI/Properties/launchSettings.json | 8 -------- src/Helper/BusRegistrationConfiguratorExt.cs | 3 ++- src/Sales/Properties/launchSettings.json | 8 -------- src/Shipping/Properties/launchSettings.json | 8 -------- 5 files changed, 2 insertions(+), 33 deletions(-) diff --git a/src/Billing/Properties/launchSettings.json b/src/Billing/Properties/launchSettings.json index 792ddc0..0a3cea7 100644 --- a/src/Billing/Properties/launchSettings.json +++ b/src/Billing/Properties/launchSettings.json @@ -15,14 +15,6 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - "AmazonSQS": { - "commandName": "Project", - "commandLineArgs": "--amazonsqs", - "launchBrowser": false, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } } } \ No newline at end of file diff --git a/src/ClientUI/Properties/launchSettings.json b/src/ClientUI/Properties/launchSettings.json index 792ddc0..0a3cea7 100644 --- a/src/ClientUI/Properties/launchSettings.json +++ b/src/ClientUI/Properties/launchSettings.json @@ -15,14 +15,6 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - "AmazonSQS": { - "commandName": "Project", - "commandLineArgs": "--amazonsqs", - "launchBrowser": false, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } } } \ No newline at end of file diff --git a/src/Helper/BusRegistrationConfiguratorExt.cs b/src/Helper/BusRegistrationConfiguratorExt.cs index d11d16e..3a7b2d0 100644 --- a/src/Helper/BusRegistrationConfiguratorExt.cs +++ b/src/Helper/BusRegistrationConfiguratorExt.cs @@ -5,7 +5,8 @@ public static class BusRegistrationConfiguratorExt { public static void SetupTransport(this IBusRegistrationConfigurator x, string[] args) { - var selectedTransport = Environment.GetEnvironmentVariable("TRANSPORT_TYPE") ?? "RabbitMQ"; + var selectedTransport = Environment.GetEnvironmentVariable("TRANSPORT_TYPE") ?? (args.Contains("--azureservicebus") ? "AzureServiceBus" : "RabbitMQ"); + string envFile; switch (selectedTransport) diff --git a/src/Sales/Properties/launchSettings.json b/src/Sales/Properties/launchSettings.json index 792ddc0..0a3cea7 100644 --- a/src/Sales/Properties/launchSettings.json +++ b/src/Sales/Properties/launchSettings.json @@ -15,14 +15,6 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - "AmazonSQS": { - "commandName": "Project", - "commandLineArgs": "--amazonsqs", - "launchBrowser": false, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } } } \ No newline at end of file diff --git a/src/Shipping/Properties/launchSettings.json b/src/Shipping/Properties/launchSettings.json index 792ddc0..0a3cea7 100644 --- a/src/Shipping/Properties/launchSettings.json +++ b/src/Shipping/Properties/launchSettings.json @@ -15,14 +15,6 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - }, - "AmazonSQS": { - "commandName": "Project", - "commandLineArgs": "--amazonsqs", - "launchBrowser": false, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } } } } \ No newline at end of file