From 22edc2fd1500bdef9f65dc217b75c9f900830ff2 Mon Sep 17 00:00:00 2001 From: James Rogers Date: Wed, 11 Dec 2024 10:31:26 +0000 Subject: [PATCH 1/2] FEAT: Update projects from net6.0 to net8.0 --- .../Examples.CustomFlowElement.csproj | 2 +- .../2. On Premise Engine/Examples.OnPremiseEngine.csproj | 2 +- .../Examples.ClientSideEvidence.MVC.csproj | 2 +- .../4. Cloud Engine/Examples.CloudEngine.csproj | 2 +- Examples/ResultCaching/Examples.ResultCaching.csproj | 2 +- Examples/UsageSharing/Examples.UsageSharing.csproj | 2 +- .../FiftyOne.Pipeline.JsonBuilderElementTests.csproj | 2 +- .../FiftyOne.Pipeline.Benchmarks.csproj | 2 +- ...ftyOne.Pipeline.CloudRequestEngine.Examples.Tests.csproj | 2 +- .../FiftyOne.Pipeline.CloudRequestEngine.Tests.csproj | 2 +- .../FiftyOne.Pipeline.Core.Tests.csproj | 2 +- .../FiftyOne.Pipeline.Engines.FiftyOne.Tests.csproj | 2 +- .../FiftyOne.Pipeline.Engines.Tests.csproj | 2 +- .../FiftyOne.Pipeline.Examples.Tests.csproj | 2 +- Web Integration/Examples/NetCore/AspNetCore Example.csproj | 2 +- Web Integration/FiftyOne.Pipeline.Web.nuspec | 6 +++--- .../FiftyOne.Pipeline.Web/FiftyOne.Pipeline.Web.csproj | 4 ++-- .../FiftyOne.Pipeline.Web.Shared.Tests.csproj | 2 +- .../FiftyOne.Pipeline.Web.Tests.csproj | 2 +- performance-tests/performance-tests.csproj | 2 +- 20 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Examples/CustomFlowElement/1. Simple Flow Element/Examples.CustomFlowElement.csproj b/Examples/CustomFlowElement/1. Simple Flow Element/Examples.CustomFlowElement.csproj index 2674e56c..18279538 100644 --- a/Examples/CustomFlowElement/1. Simple Flow Element/Examples.CustomFlowElement.csproj +++ b/Examples/CustomFlowElement/1. Simple Flow Element/Examples.CustomFlowElement.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 AnyCPU false diff --git a/Examples/CustomFlowElement/2. On Premise Engine/Examples.OnPremiseEngine.csproj b/Examples/CustomFlowElement/2. On Premise Engine/Examples.OnPremiseEngine.csproj index 19c1ea21..3b979bd3 100644 --- a/Examples/CustomFlowElement/2. On Premise Engine/Examples.OnPremiseEngine.csproj +++ b/Examples/CustomFlowElement/2. On Premise Engine/Examples.OnPremiseEngine.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 AnyCPU false diff --git a/Examples/CustomFlowElement/3. Client-side evidence/ClientSideEvidence.MVC/Examples.ClientSideEvidence.MVC.csproj b/Examples/CustomFlowElement/3. Client-side evidence/ClientSideEvidence.MVC/Examples.ClientSideEvidence.MVC.csproj index e8a2d14a..abd867c9 100644 --- a/Examples/CustomFlowElement/3. Client-side evidence/ClientSideEvidence.MVC/Examples.ClientSideEvidence.MVC.csproj +++ b/Examples/CustomFlowElement/3. Client-side evidence/ClientSideEvidence.MVC/Examples.ClientSideEvidence.MVC.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false diff --git a/Examples/CustomFlowElement/4. Cloud Engine/Examples.CloudEngine.csproj b/Examples/CustomFlowElement/4. Cloud Engine/Examples.CloudEngine.csproj index 06658d8a..1a0fa25c 100644 --- a/Examples/CustomFlowElement/4. Cloud Engine/Examples.CloudEngine.csproj +++ b/Examples/CustomFlowElement/4. Cloud Engine/Examples.CloudEngine.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 AnyCPU false diff --git a/Examples/ResultCaching/Examples.ResultCaching.csproj b/Examples/ResultCaching/Examples.ResultCaching.csproj index 97ce59f6..b5abc332 100644 --- a/Examples/ResultCaching/Examples.ResultCaching.csproj +++ b/Examples/ResultCaching/Examples.ResultCaching.csproj @@ -3,7 +3,7 @@ Exe AnyCPU - net6.0 + net8.0 false diff --git a/Examples/UsageSharing/Examples.UsageSharing.csproj b/Examples/UsageSharing/Examples.UsageSharing.csproj index 29f2ead4..b2670514 100644 --- a/Examples/UsageSharing/Examples.UsageSharing.csproj +++ b/Examples/UsageSharing/Examples.UsageSharing.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 false diff --git a/FiftyOne.Pipeline.Elements/FiftyOne.Pipeline.JsonBuilderElementTests/FiftyOne.Pipeline.JsonBuilderElementTests.csproj b/FiftyOne.Pipeline.Elements/FiftyOne.Pipeline.JsonBuilderElementTests/FiftyOne.Pipeline.JsonBuilderElementTests.csproj index 9713c5b6..8cd6a511 100644 --- a/FiftyOne.Pipeline.Elements/FiftyOne.Pipeline.JsonBuilderElementTests/FiftyOne.Pipeline.JsonBuilderElementTests.csproj +++ b/FiftyOne.Pipeline.Elements/FiftyOne.Pipeline.JsonBuilderElementTests/FiftyOne.Pipeline.JsonBuilderElementTests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false diff --git a/Tests/FiftyOne.Pipeline.Benchmarks/FiftyOne.Pipeline.Benchmarks.csproj b/Tests/FiftyOne.Pipeline.Benchmarks/FiftyOne.Pipeline.Benchmarks.csproj index 0d17784c..8b754bb9 100644 --- a/Tests/FiftyOne.Pipeline.Benchmarks/FiftyOne.Pipeline.Benchmarks.csproj +++ b/Tests/FiftyOne.Pipeline.Benchmarks/FiftyOne.Pipeline.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 false diff --git a/Tests/FiftyOne.Pipeline.CloudRequestEngine.Examples.Tests/FiftyOne.Pipeline.CloudRequestEngine.Examples.Tests.csproj b/Tests/FiftyOne.Pipeline.CloudRequestEngine.Examples.Tests/FiftyOne.Pipeline.CloudRequestEngine.Examples.Tests.csproj index aed085dd..ea314bd9 100644 --- a/Tests/FiftyOne.Pipeline.CloudRequestEngine.Examples.Tests/FiftyOne.Pipeline.CloudRequestEngine.Examples.Tests.csproj +++ b/Tests/FiftyOne.Pipeline.CloudRequestEngine.Examples.Tests/FiftyOne.Pipeline.CloudRequestEngine.Examples.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false diff --git a/Tests/FiftyOne.Pipeline.CloudRequestEngine.Tests/FiftyOne.Pipeline.CloudRequestEngine.Tests.csproj b/Tests/FiftyOne.Pipeline.CloudRequestEngine.Tests/FiftyOne.Pipeline.CloudRequestEngine.Tests.csproj index b1f08ba5..9f378f5f 100644 --- a/Tests/FiftyOne.Pipeline.CloudRequestEngine.Tests/FiftyOne.Pipeline.CloudRequestEngine.Tests.csproj +++ b/Tests/FiftyOne.Pipeline.CloudRequestEngine.Tests/FiftyOne.Pipeline.CloudRequestEngine.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false diff --git a/Tests/FiftyOne.Pipeline.Core.Tests/FiftyOne.Pipeline.Core.Tests.csproj b/Tests/FiftyOne.Pipeline.Core.Tests/FiftyOne.Pipeline.Core.Tests.csproj index e62f05be..6eb7f39f 100644 --- a/Tests/FiftyOne.Pipeline.Core.Tests/FiftyOne.Pipeline.Core.Tests.csproj +++ b/Tests/FiftyOne.Pipeline.Core.Tests/FiftyOne.Pipeline.Core.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false diff --git a/Tests/FiftyOne.Pipeline.Engines.FiftyOne.Tests/FiftyOne.Pipeline.Engines.FiftyOne.Tests.csproj b/Tests/FiftyOne.Pipeline.Engines.FiftyOne.Tests/FiftyOne.Pipeline.Engines.FiftyOne.Tests.csproj index 2605dd71..8a0bf6a4 100644 --- a/Tests/FiftyOne.Pipeline.Engines.FiftyOne.Tests/FiftyOne.Pipeline.Engines.FiftyOne.Tests.csproj +++ b/Tests/FiftyOne.Pipeline.Engines.FiftyOne.Tests/FiftyOne.Pipeline.Engines.FiftyOne.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false diff --git a/Tests/FiftyOne.Pipeline.Engines.Tests/FiftyOne.Pipeline.Engines.Tests.csproj b/Tests/FiftyOne.Pipeline.Engines.Tests/FiftyOne.Pipeline.Engines.Tests.csproj index 9e38f223..e7b71dd7 100644 --- a/Tests/FiftyOne.Pipeline.Engines.Tests/FiftyOne.Pipeline.Engines.Tests.csproj +++ b/Tests/FiftyOne.Pipeline.Engines.Tests/FiftyOne.Pipeline.Engines.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 false diff --git a/Tests/FiftyOne.Pipeline.Examples.Tests/FiftyOne.Pipeline.Examples.Tests.csproj b/Tests/FiftyOne.Pipeline.Examples.Tests/FiftyOne.Pipeline.Examples.Tests.csproj index cf5e9b7c..8d6973a9 100644 --- a/Tests/FiftyOne.Pipeline.Examples.Tests/FiftyOne.Pipeline.Examples.Tests.csproj +++ b/Tests/FiftyOne.Pipeline.Examples.Tests/FiftyOne.Pipeline.Examples.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 false diff --git a/Web Integration/Examples/NetCore/AspNetCore Example.csproj b/Web Integration/Examples/NetCore/AspNetCore Example.csproj index bf073e02..2bf329cc 100644 --- a/Web Integration/Examples/NetCore/AspNetCore Example.csproj +++ b/Web Integration/Examples/NetCore/AspNetCore Example.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 AspNetCore_Example AspNetCore_Example diff --git a/Web Integration/FiftyOne.Pipeline.Web.nuspec b/Web Integration/FiftyOne.Pipeline.Web.nuspec index f795d37f..81e03896 100644 --- a/Web Integration/FiftyOne.Pipeline.Web.nuspec +++ b/Web Integration/FiftyOne.Pipeline.Web.nuspec @@ -14,7 +14,7 @@ 51degrees,pipeline,aggregate,data service,web - + @@ -38,12 +38,12 @@ - + - + diff --git a/Web Integration/FiftyOne.Pipeline.Web/FiftyOne.Pipeline.Web.csproj b/Web Integration/FiftyOne.Pipeline.Web/FiftyOne.Pipeline.Web.csproj index 6d01c044..53c090a2 100644 --- a/Web Integration/FiftyOne.Pipeline.Web/FiftyOne.Pipeline.Web.csproj +++ b/Web Integration/FiftyOne.Pipeline.Web/FiftyOne.Pipeline.Web.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1;net6.0 + netcoreapp3.1;net8.0 AnyCPU true true @@ -33,7 +33,7 @@ - + diff --git a/Web Integration/Tests/FiftyOne.Pipeline.Web.Shared.Tests/FiftyOne.Pipeline.Web.Shared.Tests.csproj b/Web Integration/Tests/FiftyOne.Pipeline.Web.Shared.Tests/FiftyOne.Pipeline.Web.Shared.Tests.csproj index 2658d0eb..9c7ec081 100644 --- a/Web Integration/Tests/FiftyOne.Pipeline.Web.Shared.Tests/FiftyOne.Pipeline.Web.Shared.Tests.csproj +++ b/Web Integration/Tests/FiftyOne.Pipeline.Web.Shared.Tests/FiftyOne.Pipeline.Web.Shared.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false diff --git a/Web Integration/Tests/FiftyOne.Pipeline.Web.Tests/FiftyOne.Pipeline.Web.Tests.csproj b/Web Integration/Tests/FiftyOne.Pipeline.Web.Tests/FiftyOne.Pipeline.Web.Tests.csproj index 66b87537..ac4b0be2 100644 --- a/Web Integration/Tests/FiftyOne.Pipeline.Web.Tests/FiftyOne.Pipeline.Web.Tests.csproj +++ b/Web Integration/Tests/FiftyOne.Pipeline.Web.Tests/FiftyOne.Pipeline.Web.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 false diff --git a/performance-tests/performance-tests.csproj b/performance-tests/performance-tests.csproj index ea5821af..9ad70e84 100644 --- a/performance-tests/performance-tests.csproj +++ b/performance-tests/performance-tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 performance_tests performance_tests From acd4daf6d9cd09e99e7e6a9bfd5c31eaea07166c Mon Sep 17 00:00:00 2001 From: James Rogers Date: Wed, 11 Dec 2024 10:35:41 +0000 Subject: [PATCH 2/2] FEAT: Use .Append method instead of .Add(). --- .../FiftyOne.Pipeline.Web/Adapters/ResponseAdapter.cs | 2 +- .../FiftyOne.Pipeline.Web/Services/SetHeadersService.cs | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Web Integration/FiftyOne.Pipeline.Web/Adapters/ResponseAdapter.cs b/Web Integration/FiftyOne.Pipeline.Web/Adapters/ResponseAdapter.cs index bcdaadd0..dca0c7e4 100644 --- a/Web Integration/FiftyOne.Pipeline.Web/Adapters/ResponseAdapter.cs +++ b/Web Integration/FiftyOne.Pipeline.Web/Adapters/ResponseAdapter.cs @@ -65,7 +65,7 @@ public void ClearHeaders() /// public void SetHeader(string name, string value) { - _response.Headers.Add(name, value); + _response.Headers.Append(name, value); } /// diff --git a/Web Integration/FiftyOne.Pipeline.Web/Services/SetHeadersService.cs b/Web Integration/FiftyOne.Pipeline.Web/Services/SetHeadersService.cs index d567a86c..fa7ea813 100644 --- a/Web Integration/FiftyOne.Pipeline.Web/Services/SetHeadersService.cs +++ b/Web Integration/FiftyOne.Pipeline.Web/Services/SetHeadersService.cs @@ -96,14 +96,7 @@ public static void SetHeaders(HttpContext context, foreach (var header in flowData.GetFromElement(element) .ResponseHeaderDictionary) { - if (context.Response.Headers.ContainsKey(header.Key)) - { - context.Response.Headers.Append(header.Key, header.Value); - } - else - { - context.Response.Headers.Add(header.Key, header.Value); - } + context.Response.Headers.Append(header.Key, header.Value); } } }