From 96ddb9dff3de082bd4eb6e8d84a53fa4c07d9932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96hlund?= Date: Tue, 18 Jun 2024 14:41:18 +0200 Subject: [PATCH] Obsolete FunctionEndpoint in favour of IFunctionEndpoint --- .../ApprovalFiles/APIApprovals.Approve.approved.txt | 2 ++ .../FunctionEndpoint.cs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/NServiceBus.AzureFunctions.Worker.ServiceBus.Tests/ApprovalFiles/APIApprovals.Approve.approved.txt b/src/NServiceBus.AzureFunctions.Worker.ServiceBus.Tests/ApprovalFiles/APIApprovals.Approve.approved.txt index 30be521..7abd9c6 100644 --- a/src/NServiceBus.AzureFunctions.Worker.ServiceBus.Tests/ApprovalFiles/APIApprovals.Approve.approved.txt +++ b/src/NServiceBus.AzureFunctions.Worker.ServiceBus.Tests/ApprovalFiles/APIApprovals.Approve.approved.txt @@ -1,6 +1,8 @@ [assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"NServiceBus.AzureFunctions.Worker.ServiceBus.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001007f16e21368ff041183fab592d9e8ed37e7be355e93323147a1d29983d6e591b04282e4da0c9e18bd901e112c0033925eb7d7872c2f1706655891c5c9d57297994f707d16ee9a8f40d978f064ee1ffc73c0db3f4712691b23bf596f75130f4ec978cf78757ec034625a5f27e6bb50c618931ea49f6f628fd74271c32959efb1c5")] namespace NServiceBus { + [System.Obsolete("Use `IFunctionEndpoint` instead. Will be treated as an error from version 6.0.0. " + + "Will be removed in version 7.0.0.", false)] public class FunctionEndpoint : NServiceBus.IFunctionEndpoint { public System.Threading.Tasks.Task Process(Azure.Messaging.ServiceBus.ServiceBusReceivedMessage message, Microsoft.Azure.Functions.Worker.ServiceBusMessageActions messageActions, Microsoft.Azure.Functions.Worker.FunctionContext functionContext, System.Threading.CancellationToken cancellationToken = default) { } diff --git a/src/NServiceBus.AzureFunctions.Worker.ServiceBus/FunctionEndpoint.cs b/src/NServiceBus.AzureFunctions.Worker.ServiceBus/FunctionEndpoint.cs index c10e3e2..ef55b16 100644 --- a/src/NServiceBus.AzureFunctions.Worker.ServiceBus/FunctionEndpoint.cs +++ b/src/NServiceBus.AzureFunctions.Worker.ServiceBus/FunctionEndpoint.cs @@ -12,6 +12,7 @@ /// An NServiceBus endpoint hosted in Azure Function which does not receive messages automatically but only handles /// messages explicitly passed to it by the caller. /// + [ObsoleteEx(TreatAsErrorFromVersion = "6", RemoveInVersion = "7", ReplacementTypeOrMember = nameof(IFunctionEndpoint))] public class FunctionEndpoint : IFunctionEndpoint { internal FunctionEndpoint(IStartableEndpointWithExternallyManagedContainer externallyManagedContainerEndpoint, ServerlessTransport serverlessTransport, IServiceProvider serviceProvider)