From 627ffb7f16d782f674fe320ecc9001bc86c04b0e Mon Sep 17 00:00:00 2001 From: kentdr Date: Fri, 25 Aug 2023 14:55:30 -0400 Subject: [PATCH] Bump NServiceBus.AmazonSQS --- src/NServiceBus.AwsLambda.SQS/FodyWeavers.xml | 3 +++ .../NServiceBus.AwsLambda.SQS.csproj | 5 +++-- .../TransportWrapper/ServerlessTransport.cs | 11 +---------- src/NServiceBus.AwsLambda.SQS/obsoletes-v2.cs | 17 +++++++++++++++++ 4 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 src/NServiceBus.AwsLambda.SQS/FodyWeavers.xml create mode 100644 src/NServiceBus.AwsLambda.SQS/obsoletes-v2.cs diff --git a/src/NServiceBus.AwsLambda.SQS/FodyWeavers.xml b/src/NServiceBus.AwsLambda.SQS/FodyWeavers.xml new file mode 100644 index 0000000..4d5e3e3 --- /dev/null +++ b/src/NServiceBus.AwsLambda.SQS/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/NServiceBus.AwsLambda.SQS/NServiceBus.AwsLambda.SQS.csproj b/src/NServiceBus.AwsLambda.SQS/NServiceBus.AwsLambda.SQS.csproj index 8fec6f2..3b238f8 100644 --- a/src/NServiceBus.AwsLambda.SQS/NServiceBus.AwsLambda.SQS.csproj +++ b/src/NServiceBus.AwsLambda.SQS/NServiceBus.AwsLambda.SQS.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -9,7 +9,8 @@ - + + diff --git a/src/NServiceBus.AwsLambda.SQS/TransportWrapper/ServerlessTransport.cs b/src/NServiceBus.AwsLambda.SQS/TransportWrapper/ServerlessTransport.cs index d347c02..b9bb495 100644 --- a/src/NServiceBus.AwsLambda.SQS/TransportWrapper/ServerlessTransport.cs +++ b/src/NServiceBus.AwsLambda.SQS/TransportWrapper/ServerlessTransport.cs @@ -6,7 +6,7 @@ using NServiceBus; using Transport; - sealed class ServerlessTransport : TransportDefinition + sealed partial class ServerlessTransport : TransportDefinition { // HINT: This constant is defined in NServiceBus but is not exposed const string MainReceiverId = "Main"; @@ -31,15 +31,6 @@ public override async Task Initialize(HostSettings host } -#pragma warning disable CS0672 // Member overrides obsolete member -#pragma warning disable CS0618 // Type or member is obsolete - - public override string ToTransportAddress(QueueAddress address) => BaseTransport.ToTransportAddress(address); - -#pragma warning restore CS0618 // Type or member is obsolete -#pragma warning restore CS0672 // Member overrides obsolete member - - public override IReadOnlyCollection GetSupportedTransactionModes() => supportedTransactionModes; readonly TransportTransactionMode[] supportedTransactionModes = diff --git a/src/NServiceBus.AwsLambda.SQS/obsoletes-v2.cs b/src/NServiceBus.AwsLambda.SQS/obsoletes-v2.cs new file mode 100644 index 0000000..44ecd91 --- /dev/null +++ b/src/NServiceBus.AwsLambda.SQS/obsoletes-v2.cs @@ -0,0 +1,17 @@ +namespace NServiceBus.AwsLambda.SQS.TransportWrapper +{ + using System; + using NServiceBus.Transport; + + sealed partial class ServerlessTransport + { +#pragma warning disable CS0672 // Member overrides obsolete member + + [ObsoleteEx(Message = "Inject the ITransportAddressResolver type to access the address translation mechanism at runtime. See the NServiceBus version 8 upgrade guide for further details.", + TreatAsErrorFromVersion = "2", + RemoveInVersion = "3")] + public override string ToTransportAddress(QueueAddress address) => throw new NotImplementedException(); + +#pragma warning restore CS0672 // Member overrides obsolete member + } +}