Skip to content

Commit 5aaabe6

Browse files
committed
fix signature of customisation classes that are dynamically created
1 parent 96ec124 commit 5aaabe6

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/ServiceControl.Transports.PostgreSql/PostgreSqlTransportCustomization.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
using Microsoft.Extensions.Logging;
88
using NServiceBus;
99
using NServiceBus.Transport.PostgreSql;
10+
using ServiceControl.Infrastructure;
1011

11-
public class PostgreSqlTransportCustomization(ILogger<PostgreSqlTransportCustomization> logger) : TransportCustomization<PostgreSqlTransport>
12+
public class PostgreSqlTransportCustomization() : TransportCustomization<PostgreSqlTransport>
1213
{
1314
protected override void CustomizeTransportForPrimaryEndpoint(EndpointConfiguration endpointConfiguration, PostgreSqlTransport transportDefinition, TransportSettings transportSettings)
1415
{
@@ -93,4 +94,6 @@ protected override string ToTransportQualifiedQueueNameCore(string queueName)
9394
static extern ref bool DisableDelayedDelivery(PostgreSqlTransport transport);
9495

9596
const string DefaultSubscriptionTableName = "SubscriptionRouting";
97+
98+
static readonly ILogger<PostgreSqlTransportCustomization> logger = LoggerUtil.CreateStaticLogger<PostgreSqlTransportCustomization>();
9699
}

src/ServiceControl.Transports.SQS/SQSTransportCustomization.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
using Microsoft.Extensions.Logging;
1313
using NServiceBus;
1414
using NServiceBus.Configuration.AdvancedExtensibility;
15+
using ServiceControl.Infrastructure;
1516

16-
public class SQSTransportCustomization(ILogger<SQSTransportCustomization> logger) : TransportCustomization<SqsTransport>
17+
public class SQSTransportCustomization() : TransportCustomization<SqsTransport>
1718
{
1819
protected override void CustomizeTransportForPrimaryEndpoint(EndpointConfiguration endpointConfiguration, SqsTransport transportDefinition, TransportSettings transportSettings)
1920
{
@@ -120,5 +121,7 @@ static void
120121
PromoteEnvironmentVariableFromConnectionString(string value, string environmentVariableName) =>
121122
Environment.SetEnvironmentVariable(environmentVariableName, value, EnvironmentVariableTarget.Process);
122123

124+
static readonly ILogger<SQSTransportCustomization> logger = LoggerUtil.CreateStaticLogger<SQSTransportCustomization>();
125+
123126
}
124127
}

src/ServiceControl.Transports.SqlServer/SqlServerTransportCustomization.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
using NServiceBus;
99
using NServiceBus.Configuration.AdvancedExtensibility;
1010
using NServiceBus.Transport.SqlServer;
11+
using ServiceControl.Infrastructure;
1112

12-
public class SqlServerTransportCustomization(ILogger<SqlServerTransportCustomization> logger) : TransportCustomization<SqlServerTransport>
13+
public class SqlServerTransportCustomization() : TransportCustomization<SqlServerTransport>
1314
{
1415
protected override void CustomizeTransportForPrimaryEndpoint(EndpointConfiguration endpointConfiguration, SqlServerTransport transportDefinition, TransportSettings transportSettings)
1516
{
@@ -87,5 +88,7 @@ protected override SqlServerTransport CreateTransport(TransportSettings transpor
8788
static extern ref bool DisableDelayedDelivery(SqlServerTransport transport);
8889

8990
const string defaultSubscriptionTableName = "SubscriptionRouting";
91+
92+
static readonly ILogger<SqlServerTransportCustomization> logger = LoggerUtil.CreateStaticLogger<SqlServerTransportCustomization>();
9093
}
9194
}

0 commit comments

Comments
 (0)