From 6db814cb8c756c91d465ddbd7ac155ad7c6708b7 Mon Sep 17 00:00:00 2001 From: James Suplizio Date: Fri, 20 Sep 2024 09:33:33 -0700 Subject: [PATCH] Update projects targeting net6 to net8 - part3 (#9021) --- .../Microsoft.Azure.Sdk.Tools.VersionGuard.csproj | 2 +- .../Azure.Sdk.Tools.WebhookRouter.Tests.csproj | 2 +- .../Azure.Sdk.Tools.WebhookRouter.csproj | 2 +- .../Routing/RouteConfigurationException.cs | 5 +---- .../Azure.Sdk.Tools.WebhookRouter/Routing/Router.cs | 6 +++--- .../Routing/RouterAuthorizationException.cs | 5 +---- .../Routing/RouterException.cs | 5 +---- 7 files changed, 9 insertions(+), 18 deletions(-) diff --git a/tools/version-guard/Microsoft.Azure.Sdk.Tools.VersionGuard/Microsoft.Azure.Sdk.Tools.VersionGuard.csproj b/tools/version-guard/Microsoft.Azure.Sdk.Tools.VersionGuard/Microsoft.Azure.Sdk.Tools.VersionGuard.csproj index 38a1ff4bfec..1f14494145c 100644 --- a/tools/version-guard/Microsoft.Azure.Sdk.Tools.VersionGuard/Microsoft.Azure.Sdk.Tools.VersionGuard.csproj +++ b/tools/version-guard/Microsoft.Azure.Sdk.Tools.VersionGuard/Microsoft.Azure.Sdk.Tools.VersionGuard.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 0.1.0 true diff --git a/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter.Tests/Azure.Sdk.Tools.WebhookRouter.Tests.csproj b/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter.Tests/Azure.Sdk.Tools.WebhookRouter.Tests.csproj index 0291e7ffcdf..e7837eda34f 100644 --- a/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter.Tests/Azure.Sdk.Tools.WebhookRouter.Tests.csproj +++ b/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter.Tests/Azure.Sdk.Tools.WebhookRouter.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false diff --git a/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Azure.Sdk.Tools.WebhookRouter.csproj b/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Azure.Sdk.Tools.WebhookRouter.csproj index 509a85d19c8..bb8a80177cd 100644 --- a/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Azure.Sdk.Tools.WebhookRouter.csproj +++ b/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Azure.Sdk.Tools.WebhookRouter.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 v3 diff --git a/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/RouteConfigurationException.cs b/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/RouteConfigurationException.cs index 7c236a36ca9..a155996df1d 100644 --- a/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/RouteConfigurationException.cs +++ b/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/RouteConfigurationException.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Text; @@ -10,8 +10,5 @@ public class RouterConfigurationException : RouterException public RouterConfigurationException() { } public RouterConfigurationException(string message) : base(message) { } public RouterConfigurationException(string message, Exception inner) : base(message, inner) { } - protected RouterConfigurationException( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) : base(info, context) { } } } diff --git a/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/Router.cs b/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/Router.cs index b6bf1654d2f..c733c894b17 100644 --- a/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/Router.cs +++ b/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/Router.cs @@ -1,4 +1,4 @@ -using Azure.Data.AppConfiguration; +using Azure.Data.AppConfiguration; using Azure.Identity; using Azure.Messaging.EventHubs; using Azure.Messaging.EventHubs.Producer; @@ -160,7 +160,7 @@ private async Task ReadAndValidateContentFromGitHubAsync(GitHubRule rule return payloadContent; } - private SHA256CryptoServiceProvider sha256 = new SHA256CryptoServiceProvider(); + private SHA256 sha256 = SHA256.Create(); private async Task ReadAndValidateContentFromAzureDevOpsAsync(AzureDevOpsRule rule, HttpRequest request) { @@ -285,7 +285,7 @@ public async Task RouteAsync(Guid route, HttpRequest request) payload ); - throw ex; + throw; } } } diff --git a/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/RouterAuthorizationException.cs b/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/RouterAuthorizationException.cs index 38339fd1c8d..35cd806e179 100644 --- a/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/RouterAuthorizationException.cs +++ b/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/RouterAuthorizationException.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Text; @@ -10,8 +10,5 @@ public class RouterAuthorizationException : RouterException public RouterAuthorizationException() { } public RouterAuthorizationException(string message) : base(message) { } public RouterAuthorizationException(string message, Exception inner) : base(message, inner) { } - protected RouterAuthorizationException( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) : base(info, context) { } } } diff --git a/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/RouterException.cs b/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/RouterException.cs index 93d68048a2e..ab9ef921a3a 100644 --- a/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/RouterException.cs +++ b/tools/webhook-router/Azure.Sdk.Tools.WebhookRouter/Routing/RouterException.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Text; @@ -10,8 +10,5 @@ public class RouterException : Exception public RouterException() { } public RouterException(string message) : base(message) { } public RouterException(string message, Exception inner) : base(message, inner) { } - protected RouterException( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) : base(info, context) { } } }