diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml
index ec072b4d94..046158f9c4 100644
--- a/.github/workflows/build-containers.yml
+++ b/.github/workflows/build-containers.yml
@@ -39,7 +39,6 @@ jobs:
uses: actions/setup-dotnet@v5.0.1
with:
global-json-file: global.json
- dotnet-version: 8.0.x
- name: Run MinVer
uses: Particular/run-minver-action@v1.0.0
- name: Validate build version
@@ -76,7 +75,7 @@ jobs:
org.opencontainers.image.created=${{ steps.date.outputs.date }}
org.opencontainers.image.title=${{ matrix.title }}
org.opencontainers.image.description=${{ matrix.description }}
- org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra
+ org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra
annotations: |
index:org.opencontainers.image.source=https://github.com/Particular/ServiceControl/tree/${{ github.sha }}
index:org.opencontainers.image.authors="Particular Software"
@@ -88,6 +87,6 @@ jobs:
index:org.opencontainers.image.created=${{ steps.date.outputs.date }}
index:org.opencontainers.image.title=${{ matrix.title }}
index:org.opencontainers.image.description=${{ matrix.description }}
- index:org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra
+ index:org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra
file: src/${{ matrix.project }}/Dockerfile
tags: ghcr.io/particular/${{ matrix.name }}:${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || env.MinVerVersion }}
diff --git a/.github/workflows/build-db-container.yml b/.github/workflows/build-db-container.yml
index 1f9851f446..08f739d33c 100644
--- a/.github/workflows/build-db-container.yml
+++ b/.github/workflows/build-db-container.yml
@@ -23,7 +23,6 @@ jobs:
uses: actions/setup-dotnet@v5.0.1
with:
global-json-file: global.json
- dotnet-version: 8.0.x
- name: Run MinVer
uses: Particular/run-minver-action@v1.0.0
- name: Validate build version
diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml
index 449cf27383..4fa81a7bb4 100644
--- a/.github/workflows/build-windows.yml
+++ b/.github/workflows/build-windows.yml
@@ -19,7 +19,6 @@ jobs:
uses: actions/setup-dotnet@v5.0.1
with:
global-json-file: global.json
- dotnet-version: 8.0.x
- name: Download RavenDB Server
run: ./tools/download-ravendb-server.ps1
- name: Build
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a33e862c78..3ba0c4877f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -41,7 +41,6 @@ jobs:
uses: actions/setup-dotnet@v5.0.1
with:
global-json-file: global.json
- dotnet-version: 8.0.x
- name: Download RavenDB Server
run: ./tools/download-ravendb-server.ps1
- name: Build
diff --git a/.github/workflows/container-integration-test.yml b/.github/workflows/container-integration-test.yml
index 68bf6ceb62..f3f23945f5 100644
--- a/.github/workflows/container-integration-test.yml
+++ b/.github/workflows/container-integration-test.yml
@@ -57,7 +57,6 @@ jobs:
uses: actions/setup-dotnet@v5.0.1
with:
global-json-file: global.json
- dotnet-version: 8.0.x
- name: Run MinVer
uses: Particular/run-minver-action@v1.0.0
- name: Log in to GitHub container registry
diff --git a/global.json b/global.json
index 188e0c1e24..11e3d8f94f 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,7 @@
{
"sdk": {
- "version": "9.0.100",
+ "version": "10.0.0",
+ "allowPrerelease": false,
"rollForward": "latestFeature"
},
"msbuild-sdks": {
diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props
index f5fedbd3a4..a4acbd77ce 100644
--- a/src/Directory.Packages.props
+++ b/src/Directory.Packages.props
@@ -5,9 +5,9 @@
-
-
-
+
+
+
@@ -17,39 +17,39 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -69,30 +69,29 @@
-
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
-
+
diff --git a/src/HealthCheckApp/HealthCheckApp.csproj b/src/HealthCheckApp/HealthCheckApp.csproj
index 36afb44b63..5352174fdb 100644
--- a/src/HealthCheckApp/HealthCheckApp.csproj
+++ b/src/HealthCheckApp/HealthCheckApp.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
Exe
enable
enable
diff --git a/src/LegacyArtifacts/LegacyArtifacts.csproj b/src/LegacyArtifacts/LegacyArtifacts.csproj
index 0cd86458b8..b94ffb1b37 100644
--- a/src/LegacyArtifacts/LegacyArtifacts.csproj
+++ b/src/LegacyArtifacts/LegacyArtifacts.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/Particular.LicensingComponent.Contracts/EndpointIndicator.cs b/src/Particular.LicensingComponent.Contracts/EndpointIndicator.cs
index da304d2435..3ca1c18b0e 100644
--- a/src/Particular.LicensingComponent.Contracts/EndpointIndicator.cs
+++ b/src/Particular.LicensingComponent.Contracts/EndpointIndicator.cs
@@ -1,4 +1,5 @@
namespace Particular.LicensingComponent.Contracts;
+
using System.Text.Json.Serialization;
[JsonConverter(typeof(JsonStringEnumConverter))]
diff --git a/src/Particular.LicensingComponent.Contracts/EnvironmentDataType.cs b/src/Particular.LicensingComponent.Contracts/EnvironmentDataType.cs
index 4d387ed098..8ef7518e5f 100644
--- a/src/Particular.LicensingComponent.Contracts/EnvironmentDataType.cs
+++ b/src/Particular.LicensingComponent.Contracts/EnvironmentDataType.cs
@@ -1,4 +1,5 @@
namespace Particular.LicensingComponent.Contracts;
+
using System.Text.Json.Serialization;
[JsonConverter(typeof(JsonStringEnumConverter))]
@@ -10,4 +11,4 @@ public enum EnvironmentDataType
AuditInstances,
ServiceControlVersion,
ServicePulseVersion
-}
+}
\ No newline at end of file
diff --git a/src/Particular.LicensingComponent.Contracts/Particular.LicensingComponent.Contracts.csproj b/src/Particular.LicensingComponent.Contracts/Particular.LicensingComponent.Contracts.csproj
index 3c088c55b2..6441ca3979 100644
--- a/src/Particular.LicensingComponent.Contracts/Particular.LicensingComponent.Contracts.csproj
+++ b/src/Particular.LicensingComponent.Contracts/Particular.LicensingComponent.Contracts.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
enable
enable
diff --git a/src/Particular.LicensingComponent.Persistence.InMemory/Particular.LicensingComponent.Persistence.InMemory.csproj b/src/Particular.LicensingComponent.Persistence.InMemory/Particular.LicensingComponent.Persistence.InMemory.csproj
index 58fa65af4b..8ad8e5b9ec 100644
--- a/src/Particular.LicensingComponent.Persistence.InMemory/Particular.LicensingComponent.Persistence.InMemory.csproj
+++ b/src/Particular.LicensingComponent.Persistence.InMemory/Particular.LicensingComponent.Persistence.InMemory.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
enable
diff --git a/src/Particular.LicensingComponent.Persistence/Particular.LicensingComponent.Persistence.csproj b/src/Particular.LicensingComponent.Persistence/Particular.LicensingComponent.Persistence.csproj
index b917294326..d78b5dbd7a 100644
--- a/src/Particular.LicensingComponent.Persistence/Particular.LicensingComponent.Persistence.csproj
+++ b/src/Particular.LicensingComponent.Persistence/Particular.LicensingComponent.Persistence.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
enable
enable
diff --git a/src/Particular.LicensingComponent.UnitTests/Particular.LicensingComponent.UnitTests.csproj b/src/Particular.LicensingComponent.UnitTests/Particular.LicensingComponent.UnitTests.csproj
index 5966340fa9..001cb3ec24 100644
--- a/src/Particular.LicensingComponent.UnitTests/Particular.LicensingComponent.UnitTests.csproj
+++ b/src/Particular.LicensingComponent.UnitTests/Particular.LicensingComponent.UnitTests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/Particular.LicensingComponent/Particular.LicensingComponent.csproj b/src/Particular.LicensingComponent/Particular.LicensingComponent.csproj
index 90f18b9547..4f87cd4a63 100644
--- a/src/Particular.LicensingComponent/Particular.LicensingComponent.csproj
+++ b/src/Particular.LicensingComponent/Particular.LicensingComponent.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
enable
enable
diff --git a/src/Particular.PlatformSample.ServiceControl/Particular.PlatformSample.ServiceControl.csproj b/src/Particular.PlatformSample.ServiceControl/Particular.PlatformSample.ServiceControl.csproj
index 181aad17cd..d6fd363f8e 100644
--- a/src/Particular.PlatformSample.ServiceControl/Particular.PlatformSample.ServiceControl.csproj
+++ b/src/Particular.PlatformSample.ServiceControl/Particular.PlatformSample.ServiceControl.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
false
Particular ServiceControl binaries for use by Particular.PlatformSample. Not intended for use outside of Particular.PlatformSample.
https://docs.particular.net/servicecontrol/
diff --git a/src/ServiceControl.AcceptanceTesting/DispatchRawMessages.cs b/src/ServiceControl.AcceptanceTesting/DispatchRawMessages.cs
index 0a5e8a5198..28e6d4f13d 100644
--- a/src/ServiceControl.AcceptanceTesting/DispatchRawMessages.cs
+++ b/src/ServiceControl.AcceptanceTesting/DispatchRawMessages.cs
@@ -14,7 +14,6 @@ public abstract class DispatchRawMessages : Feature
{
protected DispatchRawMessages()
{
- EnableByDefault();
}
protected override void Setup(FeatureConfigurationContext context)
diff --git a/src/ServiceControl.AcceptanceTesting/EndpointConfigurationExtensions.cs b/src/ServiceControl.AcceptanceTesting/EndpointConfigurationExtensions.cs
index 1ee7563f17..bc7935a031 100644
--- a/src/ServiceControl.AcceptanceTesting/EndpointConfigurationExtensions.cs
+++ b/src/ServiceControl.AcceptanceTesting/EndpointConfigurationExtensions.cs
@@ -31,7 +31,6 @@ public static void ScanTypesForTest(this EndpointConfiguration config,
.SelectMany(a => a.GetTypes())
.Union(GetNestedTypeRecursive(customizationConfiguration.BuilderType.DeclaringType, customizationConfiguration.BuilderType))
.Union(customizationConfiguration.TypesToInclude)
- .Except(customizationConfiguration.TypesToExclude)
.ToList());
return;
diff --git a/src/ServiceControl.AcceptanceTesting/ServiceControl.AcceptanceTesting.csproj b/src/ServiceControl.AcceptanceTesting/ServiceControl.AcceptanceTesting.csproj
index fb3544fabd..7c6db54c54 100644
--- a/src/ServiceControl.AcceptanceTesting/ServiceControl.AcceptanceTesting.csproj
+++ b/src/ServiceControl.AcceptanceTesting/ServiceControl.AcceptanceTesting.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.AcceptanceTests.RavenDB/Recoverability/MessageFailures/When_a_failed_message_is_retried.cs b/src/ServiceControl.AcceptanceTests.RavenDB/Recoverability/MessageFailures/When_a_failed_message_is_retried.cs
index d7c9878f08..800deaf7ea 100644
--- a/src/ServiceControl.AcceptanceTests.RavenDB/Recoverability/MessageFailures/When_a_failed_message_is_retried.cs
+++ b/src/ServiceControl.AcceptanceTests.RavenDB/Recoverability/MessageFailures/When_a_failed_message_is_retried.cs
@@ -200,28 +200,21 @@ public FailingEndpoint() =>
c.GetSettings().Get().TransportTransactionMode =
TransportTransactionMode.ReceiveOnly;
c.EnableFeature();
+
+ c.RegisterStartupTask(new SendMessageAtStart());
+
c.ReportSuccessfulRetriesToServiceControl();
c.NoRetries();
});
- class StartFeature : Feature
+ class SendMessageAtStart : FeatureStartupTask
{
- public StartFeature() => EnableByDefault();
-
- protected override void Setup(FeatureConfigurationContext context)
- {
- context.RegisterStartupTask(new SendMessageAtStart());
- }
+ protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default)
+ => session.SendLocal(new MyMessage(), cancellationToken);
- class SendMessageAtStart : FeatureStartupTask
- {
- protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default)
- => session.SendLocal(new MyMessage(), cancellationToken);
-
- protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default)
- => Task.CompletedTask;
- }
+ protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default)
+ => Task.CompletedTask;
}
public class MyMessageHandler(Context scenarioContext, IReadOnlySettings settings)
@@ -254,30 +247,16 @@ public FailingEndpointWithoutAudit() =>
TransportTransactionMode.ReceiveOnly;
c.EnableFeature();
+ c.RegisterStartupTask(new SendMessageAtStart());
+
c.NoRetries();
});
- class StartFeature : Feature
+ class SendMessageAtStart : FeatureStartupTask
{
- public StartFeature() => EnableByDefault();
+ protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default) => session.SendLocal(new MyMessage(), cancellationToken);
- protected override void Setup(FeatureConfigurationContext context)
- {
- context.RegisterStartupTask(new SendMessageAtStart());
- }
-
- class SendMessageAtStart : FeatureStartupTask
- {
- protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default)
- {
- return session.SendLocal(new MyMessage(), cancellationToken);
- }
-
- protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default)
- {
- return Task.CompletedTask;
- }
- }
+ protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default) => Task.CompletedTask;
}
public class MyMessageHandler(Context scenarioContext, IReadOnlySettings settings)
diff --git a/src/ServiceControl.AcceptanceTests.RavenDB/ServiceControl.AcceptanceTests.RavenDB.csproj b/src/ServiceControl.AcceptanceTests.RavenDB/ServiceControl.AcceptanceTests.RavenDB.csproj
index 3dc48639d3..f8033e858f 100644
--- a/src/ServiceControl.AcceptanceTests.RavenDB/ServiceControl.AcceptanceTests.RavenDB.csproj
+++ b/src/ServiceControl.AcceptanceTests.RavenDB/ServiceControl.AcceptanceTests.RavenDB.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/ExternalIntegration/ExternalIntegrationAcceptanceTest.cs b/src/ServiceControl.AcceptanceTests/Recoverability/ExternalIntegration/ExternalIntegrationAcceptanceTest.cs
index bec6039d65..d717d22c7f 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/ExternalIntegration/ExternalIntegrationAcceptanceTest.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/ExternalIntegration/ExternalIntegrationAcceptanceTest.cs
@@ -19,6 +19,7 @@ public class ErrorSender : EndpointConfigurationBuilder
public ErrorSender() =>
EndpointSetup(c =>
{
+ c.EnableFeature();
c.NoDelayedRetries();
c.ReportSuccessfulRetriesToServiceControl();
});
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/Groups/When_message_groups_are_sorted_by_a_web_api_call.cs b/src/ServiceControl.AcceptanceTests/Recoverability/Groups/When_message_groups_are_sorted_by_a_web_api_call.cs
index f0427796d5..ac6e0b85e5 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/Groups/When_message_groups_are_sorted_by_a_web_api_call.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/Groups/When_message_groups_are_sorted_by_a_web_api_call.cs
@@ -88,6 +88,7 @@ public class Receiver : EndpointConfigurationBuilder
public Receiver() =>
EndpointSetup(c =>
{
+ c.EnableFeature();
c.NoRetries();
c.LimitMessageProcessingConcurrencyTo(1);
});
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/Is_System_Message_Tests.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/Is_System_Message_Tests.cs
index 9e135ee046..a1226f66c2 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/Is_System_Message_Tests.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/Is_System_Message_Tests.cs
@@ -130,9 +130,9 @@ await Define(ctx =>
public class ServerEndpoint : EndpointConfigurationBuilder
{
- public ServerEndpoint() => EndpointSetup();
+ public ServerEndpoint() => EndpointSetup(c => c.EnableFeature());
- class Foo : DispatchRawMessages
+ class SendMessage : DispatchRawMessages
{
protected override TransportOperations CreateMessage(SystemMessageTestContext context)
{
@@ -164,7 +164,7 @@ protected override TransportOperations CreateMessage(SystemMessageTestContext co
headers[Headers.ControlMessageHeader] = context.ControlMessageHeaderValue != null && (bool)context.ControlMessageHeaderValue ? context.ControlMessageHeaderValue.ToString() : null;
}
- return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, new byte[0]), new UnicastAddressTag("error")));
+ return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, Array.Empty()), new UnicastAddressTag("error")));
}
}
}
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_SagaComplete_message_fails.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_SagaComplete_message_fails.cs
index fc137215e8..9a4fb727ff 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_SagaComplete_message_fails.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_SagaComplete_message_fails.cs
@@ -36,7 +36,11 @@ await Define()
public class FailureEndpoint : EndpointConfigurationBuilder
{
- public FailureEndpoint() => EndpointSetup(c => { c.NoDelayedRetries(); });
+ public FailureEndpoint() => EndpointSetup(c =>
+ {
+ c.EnableFeature();
+ c.NoDelayedRetries();
+ });
public class SendFailedMessage : DispatchRawMessages
{
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_failed_message_is_pending_retry.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_failed_message_is_pending_retry.cs
index 1237d27c62..169039b832 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_failed_message_is_pending_retry.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_failed_message_is_pending_retry.cs
@@ -61,24 +61,18 @@ public FailingEndpoint() =>
c.GetSettings().Get().TransportTransactionMode =
TransportTransactionMode.ReceiveOnly;
c.EnableFeature();
+ c.RegisterStartupTask(new SendMessageAtStart());
c.DisableFeature();
var recoverability = c.Recoverability();
recoverability.Immediate(s => s.NumberOfRetries(1));
recoverability.Delayed(s => s.NumberOfRetries(0));
});
- class StartFeature : Feature
+ class SendMessageAtStart : FeatureStartupTask
{
- public StartFeature() => EnableByDefault();
+ protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default) => session.SendLocal(new MyMessage(), cancellationToken);
- protected override void Setup(FeatureConfigurationContext context) => context.RegisterStartupTask(new SendMessageAtStart());
-
- class SendMessageAtStart : FeatureStartupTask
- {
- protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default) => session.SendLocal(new MyMessage(), cancellationToken);
-
- protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default) => Task.CompletedTask;
- }
+ protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default) => Task.CompletedTask;
}
public class MyMessageHandler(Context scenarioContext, IReadOnlySettings settings)
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed.cs
index f2c48dc74b..5770977ac6 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed.cs
@@ -285,14 +285,14 @@ public class EndpointThatUsesSignalR : EndpointConfigurationBuilder
public EndpointThatUsesSignalR() =>
EndpointSetup(c =>
{
+ c.EnableFeature();
+
var routing = c.ConfigureRouting();
routing.RouteToEndpoint(typeof(MyMessage), typeof(Receiver));
});
class SignalRStarterFeature : Feature
{
- public SignalRStarterFeature() => EnableByDefault();
-
protected override void Setup(FeatureConfigurationContext context)
{
context.Services.AddSingleton();
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed_from_send_only_endpoint.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed_from_send_only_endpoint.cs
index 9daae5e6f9..a310abb4b7 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed_from_send_only_endpoint.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed_from_send_only_endpoint.cs
@@ -58,9 +58,9 @@ await Define(ctx =>
public class SendOnlyEndpoint : EndpointConfigurationBuilder
{
- public SendOnlyEndpoint() => EndpointSetup();
+ public SendOnlyEndpoint() => EndpointSetup(c => c.EnableFeature());
- class Foo : DispatchRawMessages
+ class SendMessage : DispatchRawMessages
{
protected override TransportOperations CreateMessage(MyContext context)
{
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_messages_fails_multiple_times.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_messages_fails_multiple_times.cs
index b9f91894be..ffd9515517 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_messages_fails_multiple_times.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_messages_fails_multiple_times.cs
@@ -51,7 +51,7 @@ class TestContext : ScenarioContext
class AnEndpoint : EndpointConfigurationBuilder
{
- public AnEndpoint() => EndpointSetup();
+ public AnEndpoint() => EndpointSetup(c => c.EnableFeature());
class FailedMessagesSender : DispatchRawMessages
{
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_fails_to_be_sent.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_fails_to_be_sent.cs
index 3e4e4e89cd..7da1d4d7a3 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_fails_to_be_sent.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_fails_to_be_sent.cs
@@ -81,6 +81,7 @@ public class FailureEndpoint : EndpointConfigurationBuilder
public FailureEndpoint() =>
EndpointSetup(c =>
{
+ c.EnableFeature();
c.NoRetries();
c.ReportSuccessfulRetriesToServiceControl();
});
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_for_a_empty_body_message_is_successful.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_for_a_empty_body_message_is_successful.cs
index d9f453cab1..2a232507ca 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_for_a_empty_body_message_is_successful.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_for_a_empty_body_message_is_successful.cs
@@ -71,6 +71,7 @@ public class FailureEndpoint : EndpointConfigurationBuilder
public FailureEndpoint() =>
EndpointSetup(c =>
{
+ c.EnableFeature();
c.NoDelayedRetries();
c.ReportSuccessfulRetriesToServiceControl();
c.Pipeline.Register(services => new LookForControlMessage(services.GetRequiredService()), "Look for control messages");
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_an_event_with_multiple_subscribers_fails.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_an_event_with_multiple_subscribers_fails.cs
index 835b8defeb..0dcf0dbd37 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_an_event_with_multiple_subscribers_fails.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_an_event_with_multiple_subscribers_fails.cs
@@ -43,7 +43,7 @@ await Define()
public class FakeFailedSubscribers : EndpointConfigurationBuilder
{
- public FakeFailedSubscribers() => EndpointSetup();
+ public FakeFailedSubscribers() => EndpointSetup(c => c.EnableFeature());
class SendDuplicateMessages : DispatchRawMessages
{
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_errors_with_same_uniqueid_are_imported.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_errors_with_same_uniqueid_are_imported.cs
index 7da463830a..e777f23e93 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_errors_with_same_uniqueid_are_imported.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_errors_with_same_uniqueid_are_imported.cs
@@ -86,7 +86,7 @@ public void Enrich(ErrorEnricherContext context)
public class SourceEndpoint : EndpointConfigurationBuilder
{
- public SourceEndpoint() => EndpointSetup();
+ public SourceEndpoint() => EndpointSetup(c => c.EnableFeature());
class SendMultipleFailedMessagesWithSameUniqueId : DispatchRawMessages
{
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs
index d79b88333c..f0d933885c 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs
@@ -117,7 +117,7 @@ public void AddMinimalRequiredHeaders()
class FailingEndpoint : EndpointConfigurationBuilder
{
- public FailingEndpoint() => EndpointSetup();
+ public FailingEndpoint() => EndpointSetup(c => c.EnableFeature());
class SendFailedMessage : DispatchRawMessages
{
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried.cs b/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried.cs
index f16197bae2..12060bad9c 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried.cs
@@ -106,7 +106,12 @@ class VerifyHeader : EndpointConfigurationBuilder
{
public VerifyHeader() =>
EndpointSetup(
- (c, r) => c.Pipeline.Register(new CaptureIncomingMessage((TestContext)r.ScenarioContext), "Captures the incoming message"));
+ (c, r) =>
+ {
+ c.EnableFeature();
+ c.Pipeline.Register(new CaptureIncomingMessage((TestContext)r.ScenarioContext),
+ "Captures the incoming message");
+ });
class FakeSender : DispatchRawMessages
{
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried_with_a_replyTo_header.cs b/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried_with_a_replyTo_header.cs
index b0eae45e18..cd054953a6 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried_with_a_replyTo_header.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried_with_a_replyTo_header.cs
@@ -53,8 +53,11 @@ class VerifyHeader : EndpointConfigurationBuilder
{
public VerifyHeader() =>
EndpointSetup(
- (c, r) => c.RegisterMessageMutator(new VerifyHeaderIsUnchanged((ReplyToContext)r.ScenarioContext))
- );
+ (c, r) =>
+ {
+ c.EnableFeature();
+ c.RegisterMessageMutator(new VerifyHeaderIsUnchanged((ReplyToContext)r.ScenarioContext));
+ });
class FakeSender : DispatchRawMessages
{
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/When_a_native_integration_message_is_retried.cs b/src/ServiceControl.AcceptanceTests/Recoverability/When_a_native_integration_message_is_retried.cs
index 6f55224368..c3cfea7d08 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/When_a_native_integration_message_is_retried.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/When_a_native_integration_message_is_retried.cs
@@ -52,8 +52,11 @@ class VerifyHeader : EndpointConfigurationBuilder
{
public VerifyHeader() =>
EndpointSetup(
- (c, r) => c.RegisterMessageMutator(new VerifyHeaderIsUnchanged((TestContext)r.ScenarioContext))
- );
+ (c, r) =>
+ {
+ c.EnableFeature();
+ c.RegisterMessageMutator(new VerifyHeaderIsUnchanged((TestContext)r.ScenarioContext));
+ });
class FakeSender : DispatchRawMessages
{
diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/When_single_message_fails_in_batch.cs b/src/ServiceControl.AcceptanceTests/Recoverability/When_single_message_fails_in_batch.cs
index 99ccbe4258..a89013e2d4 100644
--- a/src/ServiceControl.AcceptanceTests/Recoverability/When_single_message_fails_in_batch.cs
+++ b/src/ServiceControl.AcceptanceTests/Recoverability/When_single_message_fails_in_batch.cs
@@ -70,7 +70,7 @@ public void Enrich(ErrorEnricherContext context)
class Sendonly : EndpointConfigurationBuilder
{
- public Sendonly() => EndpointSetup();
+ public Sendonly() => EndpointSetup(c => c.EnableFeature());
class SendMessage : DispatchRawMessages
{
diff --git a/src/ServiceControl.Api/ServiceControl.Api.csproj b/src/ServiceControl.Api/ServiceControl.Api.csproj
index ae2821edbb..00b9359e9d 100644
--- a/src/ServiceControl.Api/ServiceControl.Api.csproj
+++ b/src/ServiceControl.Api/ServiceControl.Api.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Audit.AcceptanceTests.RavenDB/ServiceControl.Audit.AcceptanceTests.RavenDB.csproj b/src/ServiceControl.Audit.AcceptanceTests.RavenDB/ServiceControl.Audit.AcceptanceTests.RavenDB.csproj
index a2b1aeea52..223e117c20 100644
--- a/src/ServiceControl.Audit.AcceptanceTests.RavenDB/ServiceControl.Audit.AcceptanceTests.RavenDB.csproj
+++ b/src/ServiceControl.Audit.AcceptanceTests.RavenDB/ServiceControl.Audit.AcceptanceTests.RavenDB.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_a_message_sent_with_missing_metadata.cs b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_a_message_sent_with_missing_metadata.cs
index c272b9f439..99fe2a3394 100644
--- a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_a_message_sent_with_missing_metadata.cs
+++ b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_a_message_sent_with_missing_metadata.cs
@@ -36,7 +36,7 @@ public async Task Should_not_be_cast_TimeSent_to_DateTimeMin()
public class ThirdPartyEndpoint : EndpointConfigurationBuilder
{
- public ThirdPartyEndpoint() => EndpointSetup();
+ public ThirdPartyEndpoint() => EndpointSetup(c => c.EnableFeature());
class SendMessage : DispatchRawMessages
{
@@ -47,7 +47,7 @@ protected override TransportOperations CreateMessage(MyContext context)
{Headers.ProcessingEndpoint, Conventions.EndpointNamingConvention(typeof(ThirdPartyEndpoint))},
{Headers.MessageId, context.MessageId}
};
- return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, new byte[0]), new UnicastAddressTag("audit")));
+ return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, Array.Empty()), new UnicastAddressTag("audit")));
}
}
}
diff --git a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_message_processed_successfully_from_sendonly.cs b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_message_processed_successfully_from_sendonly.cs
index 3469a8d964..22a0b3d463 100644
--- a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_message_processed_successfully_from_sendonly.cs
+++ b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_message_processed_successfully_from_sendonly.cs
@@ -34,7 +34,7 @@ public async Task Should_import_messages_from_sendonly_endpoint()
class Sendonly : EndpointConfigurationBuilder
{
- public Sendonly() => EndpointSetup();
+ public Sendonly() => EndpointSetup(c => c.EnableFeature());
class SendMessage : DispatchRawMessages
{
@@ -45,7 +45,7 @@ protected override TransportOperations CreateMessage(MyContext context)
[Headers.MessageId] = context.MessageId,
[Headers.ProcessingEndpoint] = Conventions.EndpointNamingConvention(typeof(Sendonly))
};
- return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, new byte[0]), new UnicastAddressTag("audit")));
+ return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, Array.Empty()), new UnicastAddressTag("audit")));
}
}
}
diff --git a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_messages_are_marked_as_system_messages.cs b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_messages_are_marked_as_system_messages.cs
index 8c42e77c67..797da4c66c 100644
--- a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_messages_are_marked_as_system_messages.cs
+++ b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_messages_are_marked_as_system_messages.cs
@@ -126,7 +126,7 @@ await Define(ctx =>
class SystemMessageEndpoint : EndpointConfigurationBuilder
{
- public SystemMessageEndpoint() => EndpointSetup();
+ public SystemMessageEndpoint() => EndpointSetup(c => c.EnableFeature());
public class SendMessageLowLevel : DispatchRawMessages
{
@@ -152,13 +152,11 @@ protected override TransportOperations CreateMessage(SystemMessageTestContext co
headers[Headers.ControlMessageHeader] = context.ControlMessageHeaderValue != null && (bool)context.ControlMessageHeaderValue ? context.ControlMessageHeaderValue.ToString() : null;
}
- return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, new byte[0]), new UnicastAddressTag("audit")));
+ return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, Array.Empty()), new UnicastAddressTag("audit")));
}
protected override Task AfterDispatch(IMessageSession session, SystemMessageTestContext context)
- {
- return session.SendLocal(new DoQueryAllowed());
- }
+ => session.SendLocal(new DoQueryAllowed());
}
class MyHandler(SystemMessageTestContext testContext) : IHandleMessages
diff --git a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_single_message_fails_in_batch.cs b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_single_message_fails_in_batch.cs
index c5c2385215..4b88b9e581 100644
--- a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_single_message_fails_in_batch.cs
+++ b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_single_message_fails_in_batch.cs
@@ -70,7 +70,7 @@ public void Enrich(AuditEnricherContext context)
class Sendonly : EndpointConfigurationBuilder
{
- public Sendonly() => EndpointSetup();
+ public Sendonly() => EndpointSetup(c => c.EnableFeature());
class SendMessage : DispatchRawMessages
{
diff --git a/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_emitted_by_a_saga_is_audited.cs b/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_emitted_by_a_saga_is_audited.cs
index 0f073fb8fd..5ff374bbae 100644
--- a/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_emitted_by_a_saga_is_audited.cs
+++ b/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_emitted_by_a_saga_is_audited.cs
@@ -49,9 +49,7 @@ public Task Handle(MessageInitiatingSaga message, IMessageHandlerContext context
}
protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper)
- {
- mapper.ConfigureMapping(msg => msg.Id).ToSaga(saga => saga.MessageId);
- }
+ => mapper.MapSaga(s => s.MessageId).ToMessage(m => m.Id);
}
public class MySagaData : ContainSagaData
diff --git a/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_a_saga_is_audited.cs b/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_a_saga_is_audited.cs
index 6cfe155c47..84cf35a221 100644
--- a/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_a_saga_is_audited.cs
+++ b/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_a_saga_is_audited.cs
@@ -71,7 +71,8 @@ public Task Handle(MessageInitiatingSaga message, IMessageHandlerContext context
return Task.CompletedTask;
}
- protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) => mapper.ConfigureMapping(msg => msg.Id).ToSaga(saga => saga.MessageId);
+ protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper)
+ => mapper.MapSaga(saga => saga.MessageId).ToMessage(msg => msg.Id);
}
public class MySagaData : ContainSagaData
diff --git a/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_multiple_sagas_is_audited.cs b/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_multiple_sagas_is_audited.cs
index 8de46c484f..b3f351ce45 100644
--- a/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_multiple_sagas_is_audited.cs
+++ b/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_multiple_sagas_is_audited.cs
@@ -76,7 +76,8 @@ public Task Handle(MessageInitiatingSaga message, IMessageHandlerContext context
return Task.CompletedTask;
}
- protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) => mapper.ConfigureMapping(msg => msg.Id).ToSaga(saga => saga.MessageId);
+ protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper)
+ => mapper.MapSaga(saga => saga.MessageId).ToMessage(msg => msg.Id);
public class MySagaData : ContainSagaData
{
@@ -97,7 +98,8 @@ public Task Handle(MessageInitiatingSaga message, IMessageHandlerContext context
return Task.CompletedTask;
}
- protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) => mapper.ConfigureMapping(msg => msg.Id).ToSaga(saga => saga.MessageId);
+ protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) =>
+ mapper.MapSaga(saga => saga.MessageId).ToMessage(msg => msg.Id);
public class MySagaData : ContainSagaData
{
diff --git a/src/ServiceControl.Audit.AcceptanceTests/ServiceControl.Audit.AcceptanceTests.csproj b/src/ServiceControl.Audit.AcceptanceTests/ServiceControl.Audit.AcceptanceTests.csproj
index 009d88af24..2bbf59bc45 100644
--- a/src/ServiceControl.Audit.AcceptanceTests/ServiceControl.Audit.AcceptanceTests.csproj
+++ b/src/ServiceControl.Audit.AcceptanceTests/ServiceControl.Audit.AcceptanceTests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Audit.Persistence.InMemory/ServiceControl.Audit.Persistence.InMemory.csproj b/src/ServiceControl.Audit.Persistence.InMemory/ServiceControl.Audit.Persistence.InMemory.csproj
index b2232a9098..f4f86456e4 100644
--- a/src/ServiceControl.Audit.Persistence.InMemory/ServiceControl.Audit.Persistence.InMemory.csproj
+++ b/src/ServiceControl.Audit.Persistence.InMemory/ServiceControl.Audit.Persistence.InMemory.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
true
diff --git a/src/ServiceControl.Audit.Persistence.RavenDB/ServiceControl.Audit.Persistence.RavenDB.csproj b/src/ServiceControl.Audit.Persistence.RavenDB/ServiceControl.Audit.Persistence.RavenDB.csproj
index 86bddad1d8..f7e9dc94c3 100644
--- a/src/ServiceControl.Audit.Persistence.RavenDB/ServiceControl.Audit.Persistence.RavenDB.csproj
+++ b/src/ServiceControl.Audit.Persistence.RavenDB/ServiceControl.Audit.Persistence.RavenDB.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
true
diff --git a/src/ServiceControl.Audit.Persistence.SagaAudit/ServiceControl.Audit.Persistence.SagaAudit.csproj b/src/ServiceControl.Audit.Persistence.SagaAudit/ServiceControl.Audit.Persistence.SagaAudit.csproj
index 133b718016..2621525920 100644
--- a/src/ServiceControl.Audit.Persistence.SagaAudit/ServiceControl.Audit.Persistence.SagaAudit.csproj
+++ b/src/ServiceControl.Audit.Persistence.SagaAudit/ServiceControl.Audit.Persistence.SagaAudit.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
\ No newline at end of file
diff --git a/src/ServiceControl.Audit.Persistence.Tests.RavenDB/ServiceControl.Audit.Persistence.Tests.RavenDB.csproj b/src/ServiceControl.Audit.Persistence.Tests.RavenDB/ServiceControl.Audit.Persistence.Tests.RavenDB.csproj
index 2be118b171..7b0f2fbb6a 100644
--- a/src/ServiceControl.Audit.Persistence.Tests.RavenDB/ServiceControl.Audit.Persistence.Tests.RavenDB.csproj
+++ b/src/ServiceControl.Audit.Persistence.Tests.RavenDB/ServiceControl.Audit.Persistence.Tests.RavenDB.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Audit.Persistence.Tests/ServiceControl.Audit.Persistence.Tests.csproj b/src/ServiceControl.Audit.Persistence.Tests/ServiceControl.Audit.Persistence.Tests.csproj
index 99442e0b0a..46c08b9687 100644
--- a/src/ServiceControl.Audit.Persistence.Tests/ServiceControl.Audit.Persistence.Tests.csproj
+++ b/src/ServiceControl.Audit.Persistence.Tests/ServiceControl.Audit.Persistence.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Audit.Persistence/DevelopmentPersistenceLocations.cs b/src/ServiceControl.Audit.Persistence/DevelopmentPersistenceLocations.cs
index 08925bde80..ffa49e2575 100644
--- a/src/ServiceControl.Audit.Persistence/DevelopmentPersistenceLocations.cs
+++ b/src/ServiceControl.Audit.Persistence/DevelopmentPersistenceLocations.cs
@@ -30,8 +30,8 @@ static DevelopmentPersistenceLocations()
const string configuration = "Release";
#endif
-#if NET8_0
- const string framework = "net8.0";
+#if NET10_0
+ const string framework = "net10.0";
#endif
}
}
diff --git a/src/ServiceControl.Audit.Persistence/ServiceControl.Audit.Persistence.csproj b/src/ServiceControl.Audit.Persistence/ServiceControl.Audit.Persistence.csproj
index f3acca0c7b..ad7832ae08 100644
--- a/src/ServiceControl.Audit.Persistence/ServiceControl.Audit.Persistence.csproj
+++ b/src/ServiceControl.Audit.Persistence/ServiceControl.Audit.Persistence.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Audit.UnitTests/ServiceControl.Audit.UnitTests.csproj b/src/ServiceControl.Audit.UnitTests/ServiceControl.Audit.UnitTests.csproj
index 8263a7ec92..9e61b337c9 100644
--- a/src/ServiceControl.Audit.UnitTests/ServiceControl.Audit.UnitTests.csproj
+++ b/src/ServiceControl.Audit.UnitTests/ServiceControl.Audit.UnitTests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Audit/Container-README.md b/src/ServiceControl.Audit/Container-README.md
index b1710e9f03..51a56d36fd 100644
--- a/src/ServiceControl.Audit/Container-README.md
+++ b/src/ServiceControl.Audit/Container-README.md
@@ -46,7 +46,7 @@ The latest release within a minor version will be tagged with `{major}.{minor}`
## Image architecture
-This image is a multi-arch image based on the [`mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra`](https://mcr.microsoft.com/en-us/product/dotnet/aspnet/about) base image supporting `linux/arm64` and `linux/amd64`.
+This image is a multi-arch image based on the [`mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra`](https://mcr.microsoft.com/en-us/product/dotnet/aspnet/about) base image supporting `linux/arm64` and `linux/amd64`.
## Authors
diff --git a/src/ServiceControl.Audit/Dockerfile b/src/ServiceControl.Audit/Dockerfile
index ee39885596..410f789465 100644
--- a/src/ServiceControl.Audit/Dockerfile
+++ b/src/ServiceControl.Audit/Dockerfile
@@ -1,5 +1,5 @@
# Build image
-FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build
+FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build
ARG TARGETARCH
WORKDIR /
ENV CI=true
@@ -9,7 +9,7 @@ RUN dotnet build src/ServiceControl.Audit/ServiceControl.Audit.csproj --configur
RUN dotnet publish src/HealthCheckApp/HealthCheckApp.csproj --arch $TARGETARCH --output /healthcheck
# Runtime image
-FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra
+FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra
WORKDIR /app
EXPOSE 44444
diff --git a/src/ServiceControl.Audit/Infrastructure/NServiceBusFactory.cs b/src/ServiceControl.Audit/Infrastructure/NServiceBusFactory.cs
index 0f45556f40..cf7ea880fb 100644
--- a/src/ServiceControl.Audit/Infrastructure/NServiceBusFactory.cs
+++ b/src/ServiceControl.Audit/Infrastructure/NServiceBusFactory.cs
@@ -7,6 +7,7 @@ namespace ServiceControl.Audit.Infrastructure
using Contracts.MessageFailures;
using NServiceBus;
using NServiceBus.Configuration.AdvancedExtensibility;
+ using Plugins;
using ServiceControl.Configuration;
using ServiceControl.Infrastructure;
using Transports;
@@ -25,6 +26,8 @@ public static void Configure(Settings.Settings settings, ITransportCustomization
assemblyScanner.ExcludeAssemblies("ServiceControl.Plugin");
}
+ configuration.EnableFeature();
+
configuration.Pipeline.Register(typeof(FullTypeNameOnlyBehavior), "Remove asm qualified name from the message type header");
configuration.GetSettings().Set("ServiceControl.Settings", settings);
diff --git a/src/ServiceControl.Audit/Infrastructure/Plugins/RegisterPluginMessages.cs b/src/ServiceControl.Audit/Infrastructure/Plugins/RegisterPluginMessages.cs
index 0de36f82b7..b6e271ca46 100644
--- a/src/ServiceControl.Audit/Infrastructure/Plugins/RegisterPluginMessages.cs
+++ b/src/ServiceControl.Audit/Infrastructure/Plugins/RegisterPluginMessages.cs
@@ -5,20 +5,13 @@
class RegisterPluginMessagesFeature : Feature
{
- public RegisterPluginMessagesFeature()
- {
- EnableByDefault();
- }
-
///
/// Invoked if the feature is activated
///
/// The feature context
- protected override void Setup(FeatureConfigurationContext context)
- {
+ protected override void Setup(FeatureConfigurationContext context) =>
context.Settings.Get().AddSystemMessagesConventions(t => t.Namespace != null
- && t.Namespace.StartsWith("ServiceControl.Plugin.")
- && t.Namespace.EndsWith(".Messages"));
- }
+ && t.Namespace.StartsWith("ServiceControl.Plugin.")
+ && t.Namespace.EndsWith(".Messages"));
}
}
\ No newline at end of file
diff --git a/src/ServiceControl.Audit/Infrastructure/Settings/Settings.cs b/src/ServiceControl.Audit/Infrastructure/Settings/Settings.cs
index dd409f0334..a8f8b212ba 100644
--- a/src/ServiceControl.Audit/Infrastructure/Settings/Settings.cs
+++ b/src/ServiceControl.Audit/Infrastructure/Settings/Settings.cs
@@ -139,16 +139,16 @@ public int MaxBodySizeToStore
{
get
{
- if (maxBodySizeToStore <= 0)
+ if (field <= 0)
{
logger.LogError("MaxBodySizeToStore settings is invalid, 1 is the minimum value. Defaulting to {MaxBodySizeToStoreDefault}", MaxBodySizeToStoreDefault);
return MaxBodySizeToStoreDefault;
}
- return maxBodySizeToStore;
+ return field;
}
- set => maxBodySizeToStore = value;
- }
+ set;
+ } = SettingsReader.Read(SettingsRootNamespace, "MaxBodySizeToStore", MaxBodySizeToStoreDefault);
public string InstanceName { get; init; } = DEFAULT_INSTANCE_NAME;
@@ -290,9 +290,6 @@ static string Subscope(string address)
// logger is intentionally not static to prevent it from being initialized before LoggingConfigurator.ConfigureLogging has been called
readonly ILogger logger = LoggerUtil.CreateStaticLogger();
-
- int maxBodySizeToStore = SettingsReader.Read(SettingsRootNamespace, "MaxBodySizeToStore", MaxBodySizeToStoreDefault);
-
public const string DEFAULT_INSTANCE_NAME = "Particular.ServiceControl.Audit";
public static readonly SettingsRootNamespace SettingsRootNamespace = new("ServiceControl.Audit");
diff --git a/src/ServiceControl.Audit/ServiceControl.Audit.csproj b/src/ServiceControl.Audit/ServiceControl.Audit.csproj
index 7ea57b06f7..1752bf81bd 100644
--- a/src/ServiceControl.Audit/ServiceControl.Audit.csproj
+++ b/src/ServiceControl.Audit/ServiceControl.Audit.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
Exe
Operations.ico
diff --git a/src/ServiceControl.Config/Commands/UpgradeAuditInstanceCommand.cs b/src/ServiceControl.Config/Commands/UpgradeAuditInstanceCommand.cs
index 91146217fe..1c0d966a94 100644
--- a/src/ServiceControl.Config/Commands/UpgradeAuditInstanceCommand.cs
+++ b/src/ServiceControl.Config/Commands/UpgradeAuditInstanceCommand.cs
@@ -7,7 +7,6 @@
using Framework;
using Framework.Commands;
using Framework.Modules;
- using ServiceControlInstaller.Engine.Configuration.ServiceControl;
using ServiceControlInstaller.Engine.Instances;
using ServiceControlInstaller.Engine.ReportCard;
using UI.InstanceDetails;
diff --git a/src/ServiceControl.DomainEvents/ServiceControl.DomainEvents.csproj b/src/ServiceControl.DomainEvents/ServiceControl.DomainEvents.csproj
index bb654606ec..afe83e1426 100644
--- a/src/ServiceControl.DomainEvents/ServiceControl.DomainEvents.csproj
+++ b/src/ServiceControl.DomainEvents/ServiceControl.DomainEvents.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Hosting/ServiceControl.Hosting.csproj b/src/ServiceControl.Hosting/ServiceControl.Hosting.csproj
index 074686312c..817b54239a 100644
--- a/src/ServiceControl.Hosting/ServiceControl.Hosting.csproj
+++ b/src/ServiceControl.Hosting/ServiceControl.Hosting.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Infrastructure.Metrics/ServiceControl.Infrastructure.Metrics.csproj b/src/ServiceControl.Infrastructure.Metrics/ServiceControl.Infrastructure.Metrics.csproj
index 58990cd569..4340f62396 100644
--- a/src/ServiceControl.Infrastructure.Metrics/ServiceControl.Infrastructure.Metrics.csproj
+++ b/src/ServiceControl.Infrastructure.Metrics/ServiceControl.Infrastructure.Metrics.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Infrastructure.Tests/ServiceControl.Infrastructure.Tests.csproj b/src/ServiceControl.Infrastructure.Tests/ServiceControl.Infrastructure.Tests.csproj
index bec2b80d02..4cddac2b26 100644
--- a/src/ServiceControl.Infrastructure.Tests/ServiceControl.Infrastructure.Tests.csproj
+++ b/src/ServiceControl.Infrastructure.Tests/ServiceControl.Infrastructure.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj b/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj
index 225a545bd9..ffdc49b0d9 100644
--- a/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj
+++ b/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
..\NServiceBus.snk
diff --git a/src/ServiceControl.Monitoring.AcceptanceTests/ServiceControl.Monitoring.AcceptanceTests.csproj b/src/ServiceControl.Monitoring.AcceptanceTests/ServiceControl.Monitoring.AcceptanceTests.csproj
index b422a1e581..5a43cc1e97 100644
--- a/src/ServiceControl.Monitoring.AcceptanceTests/ServiceControl.Monitoring.AcceptanceTests.csproj
+++ b/src/ServiceControl.Monitoring.AcceptanceTests/ServiceControl.Monitoring.AcceptanceTests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs b/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs
index 7b4d47be94..52e60e9205 100644
--- a/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs
+++ b/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs
@@ -22,21 +22,19 @@ public async Task Should_report_via_http()
await Define(ctx => context = ctx)
.WithEndpoint(b =>
- b.CustomConfig(endpointConfig => endpointConfig.EnableMetrics().SendMetricDataToServiceControl(Settings.DEFAULT_INSTANCE_NAME, TimeSpan.FromMilliseconds(200), "First"))
- .ToCreateInstance(endpointConfig => Endpoint.Create(endpointConfig), async (startableEndpoint, cancellationToken) =>
- {
- context.FirstInstance = await startableEndpoint.Start(cancellationToken);
-
- return context.FirstInstance;
- }))
+ b.CustomConfig(c => c.EnableMetrics().SendMetricDataToServiceControl(Settings.DEFAULT_INSTANCE_NAME, TimeSpan.FromMilliseconds(200), "First"))
+ .ToCreateInstance((services, configuration) => EndpointWithExternallyManagedContainer.Create(configuration, services), async (startableEndpoint, provider, ct) =>
+ {
+ context.FirstInstance = await startableEndpoint.Start(provider, ct);
+ return context.FirstInstance;
+ }))
.WithEndpoint(b =>
- b.CustomConfig(endpointConfig => endpointConfig.EnableMetrics().SendMetricDataToServiceControl(Settings.DEFAULT_INSTANCE_NAME, TimeSpan.FromMilliseconds(200), "Second"))
- .ToCreateInstance(endpointConfig => Endpoint.Create(endpointConfig), async (startableEndpoint, cancellationToken) =>
- {
- context.SecondInstance = await startableEndpoint.Start(cancellationToken);
-
- return context.SecondInstance;
- }))
+ b.CustomConfig(c => c.EnableMetrics().SendMetricDataToServiceControl(Settings.DEFAULT_INSTANCE_NAME, TimeSpan.FromMilliseconds(200), "Second"))
+ .ToCreateInstance((services, configuration) => EndpointWithExternallyManagedContainer.Create(configuration, services), async (startableEndpoint, provider, ct) =>
+ {
+ context.SecondInstance = await startableEndpoint.Start(provider, ct);
+ return context.SecondInstance;
+ }))
.Done(async c =>
{
if (!c.WaitedInitial2Seconds)
diff --git a/src/ServiceControl.Monitoring.UnitTests/ServiceControl.Monitoring.UnitTests.csproj b/src/ServiceControl.Monitoring.UnitTests/ServiceControl.Monitoring.UnitTests.csproj
index c0f8ffb9de..25d2bb6b22 100644
--- a/src/ServiceControl.Monitoring.UnitTests/ServiceControl.Monitoring.UnitTests.csproj
+++ b/src/ServiceControl.Monitoring.UnitTests/ServiceControl.Monitoring.UnitTests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Monitoring/Container-README.md b/src/ServiceControl.Monitoring/Container-README.md
index ef1af24479..bc3c223f15 100644
--- a/src/ServiceControl.Monitoring/Container-README.md
+++ b/src/ServiceControl.Monitoring/Container-README.md
@@ -45,7 +45,7 @@ The latest release within a minor version will be tagged with `{major}.{minor}`
## Image architecture
-This image is a multi-arch image based on the [`mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra`](https://mcr.microsoft.com/en-us/product/dotnet/aspnet/about) base image supporting `linux/arm64` and `linux/amd64`.
+This image is a multi-arch image based on the [`mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra`](https://mcr.microsoft.com/en-us/product/dotnet/aspnet/about) base image supporting `linux/arm64` and `linux/amd64`.
## Authors
diff --git a/src/ServiceControl.Monitoring/Dockerfile b/src/ServiceControl.Monitoring/Dockerfile
index 642083886e..f7fdaab4b0 100644
--- a/src/ServiceControl.Monitoring/Dockerfile
+++ b/src/ServiceControl.Monitoring/Dockerfile
@@ -1,5 +1,5 @@
# Build image
-FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build
+FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build
ARG TARGETARCH
WORKDIR /
ENV CI=true
@@ -9,7 +9,7 @@ RUN dotnet build src/ServiceControl.Monitoring/ServiceControl.Monitoring.csproj
RUN dotnet publish src/HealthCheckApp/HealthCheckApp.csproj --arch $TARGETARCH --output /healthcheck
# Runtime image
-FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra
+FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra
WORKDIR /app
EXPOSE 33633
diff --git a/src/ServiceControl.Monitoring/ServiceControl.Monitoring.csproj b/src/ServiceControl.Monitoring/ServiceControl.Monitoring.csproj
index 1a9b705469..566d603e07 100644
--- a/src/ServiceControl.Monitoring/ServiceControl.Monitoring.csproj
+++ b/src/ServiceControl.Monitoring/ServiceControl.Monitoring.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
Exe
Operations.ico
diff --git a/src/ServiceControl.MultiInstance.AcceptanceTests/SagaAudit/When_sending_saga_audit_to_audit_instance.cs b/src/ServiceControl.MultiInstance.AcceptanceTests/SagaAudit/When_sending_saga_audit_to_audit_instance.cs
index 4e6773ab61..3904d90e99 100644
--- a/src/ServiceControl.MultiInstance.AcceptanceTests/SagaAudit/When_sending_saga_audit_to_audit_instance.cs
+++ b/src/ServiceControl.MultiInstance.AcceptanceTests/SagaAudit/When_sending_saga_audit_to_audit_instance.cs
@@ -90,9 +90,7 @@ public Task Handle(MessageInitiatingSaga message, IMessageHandlerContext context
}
protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper)
- {
- mapper.ConfigureMapping(msg => msg.Id).ToSaga(saga => saga.MessageId);
- }
+ => mapper.MapSaga(saga => saga.MessageId).ToMessage(msg => msg.Id);
}
public class MySagaData : ContainSagaData
diff --git a/src/ServiceControl.MultiInstance.AcceptanceTests/ServiceControl.MultiInstance.AcceptanceTests.csproj b/src/ServiceControl.MultiInstance.AcceptanceTests/ServiceControl.MultiInstance.AcceptanceTests.csproj
index caf170a5d6..10b78c9ba4 100644
--- a/src/ServiceControl.MultiInstance.AcceptanceTests/ServiceControl.MultiInstance.AcceptanceTests.csproj
+++ b/src/ServiceControl.MultiInstance.AcceptanceTests/ServiceControl.MultiInstance.AcceptanceTests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Persistence.RavenDB/ErrorMessagesDataStore.cs b/src/ServiceControl.Persistence.RavenDB/ErrorMessagesDataStore.cs
index 4940807646..df59b8fdf9 100644
--- a/src/ServiceControl.Persistence.RavenDB/ErrorMessagesDataStore.cs
+++ b/src/ServiceControl.Persistence.RavenDB/ErrorMessagesDataStore.cs
@@ -592,10 +592,7 @@ public async Task RevertRetry(string messageUniqueId)
using var session = await sessionProvider.OpenSession();
var failedMessage = await session
.LoadAsync(FailedMessageIdGenerator.MakeDocumentId(messageUniqueId));
- if (failedMessage != null)
- {
- failedMessage.Status = FailedMessageStatus.Unresolved;
- }
+ failedMessage?.Status = FailedMessageStatus.Unresolved;
var failedMessageRetry = await session
.LoadAsync(FailedMessageRetry.MakeDocumentId(messageUniqueId));
diff --git a/src/ServiceControl.Persistence.RavenDB/ServiceControl.Persistence.RavenDB.csproj b/src/ServiceControl.Persistence.RavenDB/ServiceControl.Persistence.RavenDB.csproj
index df290177d9..2c9a2273c9 100644
--- a/src/ServiceControl.Persistence.RavenDB/ServiceControl.Persistence.RavenDB.csproj
+++ b/src/ServiceControl.Persistence.RavenDB/ServiceControl.Persistence.RavenDB.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
true
diff --git a/src/ServiceControl.Persistence.Tests.InMemory/ServiceControl.Persistence.Tests.InMemory.csproj b/src/ServiceControl.Persistence.Tests.InMemory/ServiceControl.Persistence.Tests.InMemory.csproj
index 14f8701c33..7451f9c672 100644
--- a/src/ServiceControl.Persistence.Tests.InMemory/ServiceControl.Persistence.Tests.InMemory.csproj
+++ b/src/ServiceControl.Persistence.Tests.InMemory/ServiceControl.Persistence.Tests.InMemory.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Persistence.Tests.RavenDB/ServiceControl.Persistence.Tests.RavenDB.csproj b/src/ServiceControl.Persistence.Tests.RavenDB/ServiceControl.Persistence.Tests.RavenDB.csproj
index f3ed716dde..5631e1959c 100644
--- a/src/ServiceControl.Persistence.Tests.RavenDB/ServiceControl.Persistence.Tests.RavenDB.csproj
+++ b/src/ServiceControl.Persistence.Tests.RavenDB/ServiceControl.Persistence.Tests.RavenDB.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Persistence/DevelopmentPersistenceLocations.cs b/src/ServiceControl.Persistence/DevelopmentPersistenceLocations.cs
index 14f31e9f1b..451009ee88 100644
--- a/src/ServiceControl.Persistence/DevelopmentPersistenceLocations.cs
+++ b/src/ServiceControl.Persistence/DevelopmentPersistenceLocations.cs
@@ -29,8 +29,8 @@ static DevelopmentPersistenceLocations()
const string configuration = "Release";
#endif
-#if NET8_0
- const string framework = "net8.0";
+#if NET10_0
+ const string framework = "net10.0";
#endif
}
}
diff --git a/src/ServiceControl.Persistence/ServiceControl.Persistence.csproj b/src/ServiceControl.Persistence/ServiceControl.Persistence.csproj
index 1806eaf133..f32e653492 100644
--- a/src/ServiceControl.Persistence/ServiceControl.Persistence.csproj
+++ b/src/ServiceControl.Persistence/ServiceControl.Persistence.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.RavenDB/RavenClientCertificate.cs b/src/ServiceControl.RavenDB/RavenClientCertificate.cs
index 0c6bc2dbb8..9792418aa7 100644
--- a/src/ServiceControl.RavenDB/RavenClientCertificate.cs
+++ b/src/ServiceControl.RavenDB/RavenClientCertificate.cs
@@ -15,7 +15,7 @@ public static class RavenClientCertificate
try
{
var bytes = Convert.FromBase64String(certInfo.ClientCertificateBase64);
- return new X509Certificate2(bytes, certInfo.ClientCertificatePassword);
+ return X509CertificateLoader.LoadPkcs12(bytes, certInfo.ClientCertificatePassword);
}
catch (Exception x) when (x is FormatException or CryptographicException)
{
@@ -29,7 +29,7 @@ public static class RavenClientCertificate
{
throw new Exception("Could not read the RavenDB client certificate from the supplied path because no file was found.");
}
- return new X509Certificate2(certInfo.ClientCertificatePath, certInfo.ClientCertificatePassword);
+ return X509CertificateLoader.LoadPkcs12FromFile(certInfo.ClientCertificatePath, certInfo.ClientCertificatePassword);
}
var applicationDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location) ?? string.Empty;
@@ -37,7 +37,7 @@ public static class RavenClientCertificate
if (File.Exists(certificatePath))
{
- return new X509Certificate2(certificatePath, certInfo.ClientCertificatePassword);
+ return X509CertificateLoader.LoadPkcs12FromFile(certificatePath, certInfo.ClientCertificatePassword);
}
return null;
}
diff --git a/src/ServiceControl.RavenDB/ServiceControl.RavenDB.csproj b/src/ServiceControl.RavenDB/ServiceControl.RavenDB.csproj
index 0479c4ff74..4e0e805a76 100644
--- a/src/ServiceControl.RavenDB/ServiceControl.RavenDB.csproj
+++ b/src/ServiceControl.RavenDB/ServiceControl.RavenDB.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
enable
diff --git a/src/ServiceControl.SagaAudit/ServiceControl.SagaAudit.csproj b/src/ServiceControl.SagaAudit/ServiceControl.SagaAudit.csproj
index e72ea86d64..ea3f1bb824 100644
--- a/src/ServiceControl.SagaAudit/ServiceControl.SagaAudit.csproj
+++ b/src/ServiceControl.SagaAudit/ServiceControl.SagaAudit.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Transports.ASBS.Tests/ServiceControl.Transports.ASBS.Tests.csproj b/src/ServiceControl.Transports.ASBS.Tests/ServiceControl.Transports.ASBS.Tests.csproj
index eb5e30a4ce..ab7b1287ac 100644
--- a/src/ServiceControl.Transports.ASBS.Tests/ServiceControl.Transports.ASBS.Tests.csproj
+++ b/src/ServiceControl.Transports.ASBS.Tests/ServiceControl.Transports.ASBS.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Transports.ASBS/ServiceControl.Transports.ASBS.csproj b/src/ServiceControl.Transports.ASBS/ServiceControl.Transports.ASBS.csproj
index a338339ece..a0404ac4a0 100644
--- a/src/ServiceControl.Transports.ASBS/ServiceControl.Transports.ASBS.csproj
+++ b/src/ServiceControl.Transports.ASBS/ServiceControl.Transports.ASBS.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
diff --git a/src/ServiceControl.Transports.ASQ.Tests/ServiceControl.Transports.ASQ.Tests.csproj b/src/ServiceControl.Transports.ASQ.Tests/ServiceControl.Transports.ASQ.Tests.csproj
index 46a71362fd..62746ec6ed 100644
--- a/src/ServiceControl.Transports.ASQ.Tests/ServiceControl.Transports.ASQ.Tests.csproj
+++ b/src/ServiceControl.Transports.ASQ.Tests/ServiceControl.Transports.ASQ.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Transports.ASQ/ServiceControl.Transports.ASQ.csproj b/src/ServiceControl.Transports.ASQ/ServiceControl.Transports.ASQ.csproj
index 2c7e270766..3d118c7bb0 100644
--- a/src/ServiceControl.Transports.ASQ/ServiceControl.Transports.ASQ.csproj
+++ b/src/ServiceControl.Transports.ASQ/ServiceControl.Transports.ASQ.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
diff --git a/src/ServiceControl.Transports.Learning/ServiceControl.Transports.Learning.csproj b/src/ServiceControl.Transports.Learning/ServiceControl.Transports.Learning.csproj
index 3f8b4b2805..c0f4a594d7 100644
--- a/src/ServiceControl.Transports.Learning/ServiceControl.Transports.Learning.csproj
+++ b/src/ServiceControl.Transports.Learning/ServiceControl.Transports.Learning.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
diff --git a/src/ServiceControl.Transports.Msmq.Tests/ServiceControl.Transports.Msmq.Tests.csproj b/src/ServiceControl.Transports.Msmq.Tests/ServiceControl.Transports.Msmq.Tests.csproj
index 308a68d4a2..835f728584 100644
--- a/src/ServiceControl.Transports.Msmq.Tests/ServiceControl.Transports.Msmq.Tests.csproj
+++ b/src/ServiceControl.Transports.Msmq.Tests/ServiceControl.Transports.Msmq.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0-windows
+ net10.0-windows
diff --git a/src/ServiceControl.Transports.Msmq/ServiceControl.Transports.Msmq.csproj b/src/ServiceControl.Transports.Msmq/ServiceControl.Transports.Msmq.csproj
index 93b7a1d6bf..05ca9be29d 100644
--- a/src/ServiceControl.Transports.Msmq/ServiceControl.Transports.Msmq.csproj
+++ b/src/ServiceControl.Transports.Msmq/ServiceControl.Transports.Msmq.csproj
@@ -1,7 +1,7 @@
- net8.0-windows
+ net10.0-windows
true
diff --git a/src/ServiceControl.Transports.PostgreSql.Tests/ServiceControl.Transports.PostgreSql.Tests.csproj b/src/ServiceControl.Transports.PostgreSql.Tests/ServiceControl.Transports.PostgreSql.Tests.csproj
index 7a3acb266d..11dab43a89 100644
--- a/src/ServiceControl.Transports.PostgreSql.Tests/ServiceControl.Transports.PostgreSql.Tests.csproj
+++ b/src/ServiceControl.Transports.PostgreSql.Tests/ServiceControl.Transports.PostgreSql.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Transports.PostgreSql/ServiceControl.Transports.PostgreSql.csproj b/src/ServiceControl.Transports.PostgreSql/ServiceControl.Transports.PostgreSql.csproj
index 1fa0bde372..b29d5d7624 100644
--- a/src/ServiceControl.Transports.PostgreSql/ServiceControl.Transports.PostgreSql.csproj
+++ b/src/ServiceControl.Transports.PostgreSql/ServiceControl.Transports.PostgreSql.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
diff --git a/src/ServiceControl.Transports.RabbitMQ/ServiceControl.Transports.RabbitMQ.csproj b/src/ServiceControl.Transports.RabbitMQ/ServiceControl.Transports.RabbitMQ.csproj
index 3450935934..7a7994e7c1 100644
--- a/src/ServiceControl.Transports.RabbitMQ/ServiceControl.Transports.RabbitMQ.csproj
+++ b/src/ServiceControl.Transports.RabbitMQ/ServiceControl.Transports.RabbitMQ.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
..\NServiceBus.snk
true
diff --git a/src/ServiceControl.Transports.RabbitMQClassicConventionalRouting.Tests/ServiceControl.Transports.RabbitMQClassicConventionalRoutingTests.csproj b/src/ServiceControl.Transports.RabbitMQClassicConventionalRouting.Tests/ServiceControl.Transports.RabbitMQClassicConventionalRoutingTests.csproj
index 32f68e736f..0870cd1fd0 100644
--- a/src/ServiceControl.Transports.RabbitMQClassicConventionalRouting.Tests/ServiceControl.Transports.RabbitMQClassicConventionalRoutingTests.csproj
+++ b/src/ServiceControl.Transports.RabbitMQClassicConventionalRouting.Tests/ServiceControl.Transports.RabbitMQClassicConventionalRoutingTests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests.csproj b/src/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests.csproj
index 228f477de6..ac242b940d 100644
--- a/src/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests.csproj
+++ b/src/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests.csproj b/src/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests.csproj
index 228f477de6..ac242b940d 100644
--- a/src/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests.csproj
+++ b/src/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests.csproj b/src/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests.csproj
index 32f68e736f..0870cd1fd0 100644
--- a/src/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests.csproj
+++ b/src/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Transports.SQS.Tests/ServiceControl.Transports.SQS.Tests.csproj b/src/ServiceControl.Transports.SQS.Tests/ServiceControl.Transports.SQS.Tests.csproj
index 655018e20c..839cd53241 100644
--- a/src/ServiceControl.Transports.SQS.Tests/ServiceControl.Transports.SQS.Tests.csproj
+++ b/src/ServiceControl.Transports.SQS.Tests/ServiceControl.Transports.SQS.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Transports.SQS/ServiceControl.Transports.SQS.csproj b/src/ServiceControl.Transports.SQS/ServiceControl.Transports.SQS.csproj
index 7b9de90780..558955213a 100644
--- a/src/ServiceControl.Transports.SQS/ServiceControl.Transports.SQS.csproj
+++ b/src/ServiceControl.Transports.SQS/ServiceControl.Transports.SQS.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
diff --git a/src/ServiceControl.Transports.SqlServer.Tests/ServiceControl.Transports.SqlServer.Tests.csproj b/src/ServiceControl.Transports.SqlServer.Tests/ServiceControl.Transports.SqlServer.Tests.csproj
index 2809591d0f..f7be8bcb3c 100644
--- a/src/ServiceControl.Transports.SqlServer.Tests/ServiceControl.Transports.SqlServer.Tests.csproj
+++ b/src/ServiceControl.Transports.SqlServer.Tests/ServiceControl.Transports.SqlServer.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Transports.SqlServer/ServiceControl.Transports.SqlServer.csproj b/src/ServiceControl.Transports.SqlServer/ServiceControl.Transports.SqlServer.csproj
index 99ff522110..fb0fd8ff89 100644
--- a/src/ServiceControl.Transports.SqlServer/ServiceControl.Transports.SqlServer.csproj
+++ b/src/ServiceControl.Transports.SqlServer/ServiceControl.Transports.SqlServer.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
diff --git a/src/ServiceControl.Transports.Tests/ServiceControl.Transports.Tests.csproj b/src/ServiceControl.Transports.Tests/ServiceControl.Transports.Tests.csproj
index aedb05ec31..d90aec2273 100644
--- a/src/ServiceControl.Transports.Tests/ServiceControl.Transports.Tests.csproj
+++ b/src/ServiceControl.Transports.Tests/ServiceControl.Transports.Tests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
diff --git a/src/ServiceControl.Transports/DevelopmentTransportLocations.cs b/src/ServiceControl.Transports/DevelopmentTransportLocations.cs
index f58bcff9bd..b7b1821cda 100644
--- a/src/ServiceControl.Transports/DevelopmentTransportLocations.cs
+++ b/src/ServiceControl.Transports/DevelopmentTransportLocations.cs
@@ -36,8 +36,8 @@ static DevelopmentTransportLocations()
const string configuration = "Release";
#endif
-#if NET8_0
- const string framework = "net8.0";
+#if NET10_0
+ const string framework = "net10.0";
#endif
}
}
diff --git a/src/ServiceControl.Transports/ServiceControl.Transports.csproj b/src/ServiceControl.Transports/ServiceControl.Transports.csproj
index 263429e5d4..59ddf05bd6 100644
--- a/src/ServiceControl.Transports/ServiceControl.Transports.csproj
+++ b/src/ServiceControl.Transports/ServiceControl.Transports.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
..\NServiceBus.snk
diff --git a/src/ServiceControl.Transports/TransportSettings.cs b/src/ServiceControl.Transports/TransportSettings.cs
index eaa94cac91..1e16d72476 100644
--- a/src/ServiceControl.Transports/TransportSettings.cs
+++ b/src/ServiceControl.Transports/TransportSettings.cs
@@ -20,10 +20,8 @@ public class TransportSettings : SettingsHolder
public string ErrorQueue
{
- set => customErrorQueue = value;
- get => string.IsNullOrEmpty(customErrorQueue) ? $"{EndpointName}.Errors" : customErrorQueue;
+ set;
+ get => string.IsNullOrEmpty(field) ? $"{EndpointName}.Errors" : field;
}
-
- string customErrorQueue;
}
}
\ No newline at end of file
diff --git a/src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj b/src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj
index 7de15bb542..5c3a965155 100644
--- a/src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj
+++ b/src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
@@ -20,7 +20,6 @@
-
diff --git a/src/ServiceControl/CompositeViews/Messages/ScatterGatherRemoteOnly.cs b/src/ServiceControl/CompositeViews/Messages/ScatterGatherRemoteOnly.cs
index 3394ceb49e..ac48eb8c90 100644
--- a/src/ServiceControl/CompositeViews/Messages/ScatterGatherRemoteOnly.cs
+++ b/src/ServiceControl/CompositeViews/Messages/ScatterGatherRemoteOnly.cs
@@ -16,8 +16,6 @@ public abstract class ScatterGatherRemoteOnly(Settings settings, IHtt
public sealed class NoOpStore
{
- public static NoOpStore Instance => instance ??= new NoOpStore();
-
- static NoOpStore instance;
+ public static NoOpStore Instance => field ??= new NoOpStore();
}
}
\ No newline at end of file
diff --git a/src/ServiceControl/Container-README.md b/src/ServiceControl/Container-README.md
index abe1dcdb3b..e0cf085e1a 100644
--- a/src/ServiceControl/Container-README.md
+++ b/src/ServiceControl/Container-README.md
@@ -47,7 +47,7 @@ The latest release within a minor version will be tagged with `{major}.{minor}`
## Image architecture
-This image is a multi-arch image based on the [`mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra`](https://mcr.microsoft.com/en-us/product/dotnet/aspnet/about) base image supporting `linux/arm64` and `linux/amd64`.
+This image is a multi-arch image based on the [`mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra`](https://mcr.microsoft.com/en-us/product/dotnet/aspnet/about) base image supporting `linux/arm64` and `linux/amd64`.
## Authors
diff --git a/src/ServiceControl/Dockerfile b/src/ServiceControl/Dockerfile
index 617c81063e..0f2330052c 100644
--- a/src/ServiceControl/Dockerfile
+++ b/src/ServiceControl/Dockerfile
@@ -1,5 +1,5 @@
# Build image
-FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build
+FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build
ARG TARGETARCH
WORKDIR /
ENV CI=true
@@ -9,7 +9,7 @@ RUN dotnet build src/ServiceControl/ServiceControl.csproj --configuration Releas
RUN dotnet publish src/HealthCheckApp/HealthCheckApp.csproj --arch $TARGETARCH --output /healthcheck
# Runtime image
-FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra
+FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra
WORKDIR /app
EXPOSE 33333
diff --git a/src/ServiceControl/ExternalIntegrations/ExternalIntegrationsFeature.cs b/src/ServiceControl/ExternalIntegrations/ExternalIntegrationsFeature.cs
index 5fc842c980..bfd098a146 100644
--- a/src/ServiceControl/ExternalIntegrations/ExternalIntegrationsFeature.cs
+++ b/src/ServiceControl/ExternalIntegrations/ExternalIntegrationsFeature.cs
@@ -4,15 +4,7 @@ namespace ServiceControl.ExternalIntegrations
class ExternalIntegrationsFeature : Feature
{
- public ExternalIntegrationsFeature()
- {
- EnableByDefault();
- }
-
protected override void Setup(FeatureConfigurationContext context)
- {
- context.Pipeline.Register(new RemoveVersionInformationBehavior(),
- "Removes version information from ServiceControl.Contracts messages");
- }
+ => context.Pipeline.Register(new RemoveVersionInformationBehavior(), "Removes version information from ServiceControl.Contracts messages");
}
}
\ No newline at end of file
diff --git a/src/ServiceControl/Infrastructure/NServiceBusFactory.cs b/src/ServiceControl/Infrastructure/NServiceBusFactory.cs
index 72116beaae..8818076cff 100644
--- a/src/ServiceControl/Infrastructure/NServiceBusFactory.cs
+++ b/src/ServiceControl/Infrastructure/NServiceBusFactory.cs
@@ -9,6 +9,7 @@ namespace ServiceBus.Management.Infrastructure
using ServiceControl.Configuration;
using ServiceControl.ExternalIntegrations;
using ServiceControl.Infrastructure;
+ using ServiceControl.Infrastructure.Plugins;
using ServiceControl.Infrastructure.Subscriptions;
using ServiceControl.Monitoring.HeartbeatMonitoring;
using ServiceControl.Notifications.Email;
@@ -28,6 +29,8 @@ public static void Configure(Settings.Settings settings, ITransportCustomization
assemblyScanner.ExcludeAssemblies("ServiceControl.Plugin");
}
+ configuration.EnableFeature();
+
configuration.GetSettings().Set("ServiceControl.Settings", settings);
transportCustomization.CustomizePrimaryEndpoint(configuration, transportSettings);
@@ -35,9 +38,9 @@ public static void Configure(Settings.Settings settings, ITransportCustomization
configuration.GetSettings().Set(settings.LoggingSettings);
configuration.SetDiagnosticsPath(settings.LoggingSettings.LogPath);
- if (settings.DisableExternalIntegrationsPublishing)
+ if (!settings.DisableExternalIntegrationsPublishing)
{
- configuration.DisableFeature();
+ configuration.EnableFeature();
}
var recoverability = configuration.Recoverability();
diff --git a/src/ServiceControl/Infrastructure/Plugins/RegisterPluginMessages.cs b/src/ServiceControl/Infrastructure/Plugins/RegisterPluginMessages.cs
index 11c11c5772..1fd3b29a43 100644
--- a/src/ServiceControl/Infrastructure/Plugins/RegisterPluginMessages.cs
+++ b/src/ServiceControl/Infrastructure/Plugins/RegisterPluginMessages.cs
@@ -5,20 +5,13 @@
class RegisterPluginMessagesFeature : Feature
{
- public RegisterPluginMessagesFeature()
- {
- EnableByDefault();
- }
-
///
/// Invoked if the feature is activated
///
/// The feature context
- protected override void Setup(FeatureConfigurationContext context)
- {
+ protected override void Setup(FeatureConfigurationContext context) =>
context.Settings.Get().AddSystemMessagesConventions(t => t.Namespace != null
- && t.Namespace.StartsWith("ServiceControl.Plugin.")
- && t.Namespace.EndsWith(".Messages"));
- }
+ && t.Namespace.StartsWith("ServiceControl.Plugin.")
+ && t.Namespace.EndsWith(".Messages"));
}
}
\ No newline at end of file
diff --git a/src/ServiceControl/Infrastructure/Settings/Settings.cs b/src/ServiceControl/Infrastructure/Settings/Settings.cs
index 772d33203d..78a72edfbd 100644
--- a/src/ServiceControl/Infrastructure/Settings/Settings.cs
+++ b/src/ServiceControl/Infrastructure/Settings/Settings.cs
@@ -109,17 +109,16 @@ public string RootUrl
public string ApiUrl => $"{RootUrl}api";
- string _instanceId;
public string InstanceId
{
get
{
- if (string.IsNullOrEmpty(_instanceId))
+ if (string.IsNullOrEmpty(field))
{
- _instanceId = InstanceIdGenerator.FromApiUrl(ApiUrl);
+ field = InstanceIdGenerator.FromApiUrl(ApiUrl);
}
- return _instanceId;
+ return field;
}
}
diff --git a/src/ServiceControl/Infrastructure/Subscriptions/ServiceControlSubscriptionPersistence.cs b/src/ServiceControl/Infrastructure/Subscriptions/ServiceControlSubscriptionPersistence.cs
index f7539ef7a0..7db47dbcc1 100644
--- a/src/ServiceControl/Infrastructure/Subscriptions/ServiceControlSubscriptionPersistence.cs
+++ b/src/ServiceControl/Infrastructure/Subscriptions/ServiceControlSubscriptionPersistence.cs
@@ -1,14 +1,12 @@
namespace ServiceControl.Infrastructure.Subscriptions
{
using NServiceBus;
- using NServiceBus.Features;
using NServiceBus.Persistence;
- class ServiceControlSubscriptionPersistence : PersistenceDefinition
+ class ServiceControlSubscriptionPersistence : PersistenceDefinition, IPersistenceDefinitionFactory
{
- public ServiceControlSubscriptionPersistence()
- {
- Supports(s => s.EnableFeatureByDefault());
- }
+ ServiceControlSubscriptionPersistence() => Supports();
+
+ static ServiceControlSubscriptionPersistence IPersistenceDefinitionFactory.Create() => new();
}
}
\ No newline at end of file
diff --git a/src/ServiceControl/Infrastructure/Subscriptions/SubscriptionStorage.cs b/src/ServiceControl/Infrastructure/Subscriptions/SubscriptionStorage.cs
index dbce55d1e3..72117ba023 100644
--- a/src/ServiceControl/Infrastructure/Subscriptions/SubscriptionStorage.cs
+++ b/src/ServiceControl/Infrastructure/Subscriptions/SubscriptionStorage.cs
@@ -8,36 +8,17 @@
using NServiceBus.Transport;
using ServiceControl.Persistence;
- class SubscriptionStorage : Feature
+ sealed class SubscriptionStorage : Feature
{
- SubscriptionStorage()
- {
- Prerequisite(c => c.Settings.Get().SupportsPublishSubscribe == false, "The transport supports native pub sub");
- }
+ public SubscriptionStorage() => Prerequisite(c => c.Settings.Get().SupportsPublishSubscribe == false, "The transport supports native pub sub");
- protected override void Setup(FeatureConfigurationContext context)
- {
- context.RegisterStartupTask(b => new PrimeSubscriptions(b.GetRequiredService()));
- }
+ protected override void Setup(FeatureConfigurationContext context) => context.RegisterStartupTask(b => new PrimeSubscriptions(b.GetRequiredService()));
- class PrimeSubscriptions : FeatureStartupTask
+ class PrimeSubscriptions(IServiceControlSubscriptionStorage persister) : FeatureStartupTask
{
- public IServiceControlSubscriptionStorage persister;
-
- public PrimeSubscriptions(IServiceControlSubscriptionStorage persister)
- {
- this.persister = persister;
- }
-
- protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default)
- {
- return persister?.Initialize() ?? Task.CompletedTask;
- }
+ protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default) => persister?.Initialize() ?? Task.CompletedTask;
- protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default)
- {
- return Task.CompletedTask;
- }
+ protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default) => Task.CompletedTask;
}
}
}
\ No newline at end of file
diff --git a/src/ServiceControl/Recoverability/Retrying/Infrastructure/ErrorQueueNameCache.cs b/src/ServiceControl/Recoverability/Retrying/Infrastructure/ErrorQueueNameCache.cs
index 51adf69c19..7c8b004662 100644
--- a/src/ServiceControl/Recoverability/Retrying/Infrastructure/ErrorQueueNameCache.cs
+++ b/src/ServiceControl/Recoverability/Retrying/Infrastructure/ErrorQueueNameCache.cs
@@ -4,19 +4,17 @@
class ErrorQueueNameCache
{
- string resolvedErrorAddress;
-
public string ResolvedErrorAddress
{
get
{
- if (string.IsNullOrEmpty(resolvedErrorAddress))
+ if (string.IsNullOrEmpty(field))
{
throw new InvalidOperationException($"{nameof(ResolvedErrorAddress)} is not set. Please set it before accessing.");
}
- return resolvedErrorAddress;
+ return field;
}
- set => resolvedErrorAddress = value;
+ set;
}
}
diff --git a/src/ServiceControl/ServiceControl.csproj b/src/ServiceControl/ServiceControl.csproj
index 04f5956ccf..fb4f3d767c 100644
--- a/src/ServiceControl/ServiceControl.csproj
+++ b/src/ServiceControl/ServiceControl.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
Exe
Operations.ico
true
diff --git a/src/ServiceControlInstaller.Packaging.UnitTests/ServiceControlInstaller.Packaging.UnitTests.csproj b/src/ServiceControlInstaller.Packaging.UnitTests/ServiceControlInstaller.Packaging.UnitTests.csproj
index 5ef875eb9c..76b172a166 100644
--- a/src/ServiceControlInstaller.Packaging.UnitTests/ServiceControlInstaller.Packaging.UnitTests.csproj
+++ b/src/ServiceControlInstaller.Packaging.UnitTests/ServiceControlInstaller.Packaging.UnitTests.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0