diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml
index 4cca9fc6b..65e65e34e 100644
--- a/.github/workflows/pipelines.yml
+++ b/.github/workflows/pipelines.yml
@@ -1,7 +1,6 @@
name: Cuemon CI/CD Pipeline
on:
pull_request:
- branches: [main]
paths-ignore:
- .codecov/**
- .docfx/**
diff --git a/.nuget/Cuemon.Extensions.Core/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Core/PackageReleaseNotes.txt
index 01df98e8c..a701552c1 100644
--- a/.nuget/Cuemon.Extensions.Core/PackageReleaseNotes.txt
+++ b/.nuget/Cuemon.Extensions.Core/PackageReleaseNotes.txt
@@ -8,6 +8,7 @@ Availability: .NET 9, .NET 8 and .NET Standard 2.0
# Breaking Changes
- REMOVED ConditionExtensions class from the Cuemon.Extensions namespace and moved members to Condition class in the Cuemon.Core assembly (Cuemon namespace)
- REMOVED ValidatorExtensions class from the Cuemon.Extensions namespace and moved members to Validator class in the Cuemon.Core assembly (Cuemon namespace)
+- REMOVED ReplaceLineEndings extension method from the StringExtensions class in the Cuemon.Extensions namespace
Version 8.3.2
Availability: .NET 8, .NET 6 and .NET Standard 2.0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5d830e238..dcd5c7bb0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -149,6 +149,32 @@ Removed features:
- UserAgentDocumentFilter class from the Cuemon.Extensions.Swashbuckle.AspNetCore namespace (breaking change)
- UserAgentDocumentOptions class from the Cuemon.Extensions.Swashbuckle.AspNetCore namespace (breaking change)
- XPathDocumentExtensions class from the Cuemon.Extensions.Swashbuckle.AspNetCore namespace (breaking change)
+- JsonSerializationInputFormatter class from the Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json namespace (breaking change)
+- JsonSerializationMvcOptionsSetup class from the Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json namespace (breaking change)
+- JsonSerializationOutputFormatter class from the Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json namespace (breaking change)
+- JsonSerializerSettingsExtensions class from the Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json namespace (breaking change)
+- MvcBuilderExtensions class from the Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json namespace (breaking change)
+- MvcCoreBuilderExtensions class from the Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json namespace (breaking change)
+- JsonConverterCollectionExtensions class from the Cuemon.Extensions.AspNetCore.Newtonsoft.Json.Converters namespace (breaking change)
+- ServiceCollectionExtensions class from the Cuemon.Extensions.AspNetCore.Newtonsoft.Json.Formatters namespace (breaking change)
+- ExceptionConverter class from the Cuemon.Extensions.Newtonsoft.Json.Converters namespace (breaking change)
+- FailureConverter class from the Cuemon.Extensions.Newtonsoft.Json.Converters namespace (breaking change)
+- JsonConverterCollectionExtensions class from the Cuemon.Extensions.Newtonsoft.Json.Converters namespace (breaking change)
+- StringFlagsEnumConverter class from the Cuemon.Extensions.Newtonsoft.Json.Converters namespace (breaking change)
+- TransientFaultExceptionConverter class from the Cuemon.Extensions.Newtonsoft.Json.Converters namespace (breaking change)
+- DynamicContractResolver class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
+- DynamicJsonConverter class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
+- NewtonsoftJsonFormatter class from the Cuemon.Extensions.Newtonsoft.Json.Formatters namespace (breaking change)
+- NewtonsoftJsonFormatterOptions class from the Cuemon.Extensions.Newtonsoft.Json.Formatters namespace (breaking change)
+- JData class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
+- JDataResult class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
+- JDataResultExtensions class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
+- JsonReaderExtensions class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
+- JsonSerializerSettingsExtensions class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
+- JsonWriterExtensions class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
+- ContractResolverExtensions class from the Cuemon.Extensions.Newtonsoft.Json.Serialization namespace (breaking change)
+- ValidatorExtensions class from the Cuemon.Extensions.Newtonsoft.Json namespace (breaking change)
+- ReplaceLineEndings extension method from the StringExtensions class in the Cuemon.Extensions namespace (breaking change)
## [8.3.2] - 2024-08-04
diff --git a/Directory.Build.props b/Directory.Build.props
index ce0a8b8dd..1b5e3e2ce 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -76,8 +76,8 @@
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -93,6 +93,6 @@
-
+
diff --git a/src/Cuemon.Extensions.Core/StringExtensions.cs b/src/Cuemon.Extensions.Core/StringExtensions.cs
index 019ae3c9a..990bad446 100644
--- a/src/Cuemon.Extensions.Core/StringExtensions.cs
+++ b/src/Cuemon.Extensions.Core/StringExtensions.cs
@@ -13,39 +13,6 @@ namespace Cuemon.Extensions
///
public static class StringExtensions
{
-#if NETSTANDARD2_0_OR_GREATER
- private static readonly Regex NewLineRegex = new(@"\r\n|\r|\n", RegexOptions.Compiled);
-
- ///
- /// Replaces all newline sequences in the current string with .
- ///
- /// The to extend.
- /// A string whose contents match the current string, but with all newline sequences replaced with .
- /// Shamefully stolen from https://github.com/WebFormsCore/WebFormsCore/blob/main/src/WebFormsCore/Util/StringExtensions.cs to support .NET Standard 2.0.
- public static string ReplaceLineEndings(this string input)
- {
- return ReplaceLineEndings(input, Environment.NewLine);
- }
-
- ///
- /// Replaces all newline sequences in the current string with .
- ///
- /// The to extend.
- /// The text to use as replacement.
- /// A string whose contents match the current string, but with all newline sequences replaced with .
- /// Shamefully stolen from https://github.com/WebFormsCore/WebFormsCore/blob/main/src/WebFormsCore/Util/StringExtensions.cs to support .NET Standard 2.0.
- ///
- /// cannot be null -or-
- /// cannot be null.
- ///
- public static string ReplaceLineEndings(this string input, string replacementText)
- {
- Validator.ThrowIfNull(input);
- Validator.ThrowIfNull(replacementText);
- return NewLineRegex.Replace(input, replacementText);
- }
-#endif
-
///
/// Returns the set difference between and or if no difference.
///
diff --git a/test/Cuemon.AspNetCore.Authentication.Tests/Cuemon.AspNetCore.Authentication.Tests.csproj b/test/Cuemon.AspNetCore.Authentication.Tests/Cuemon.AspNetCore.Authentication.Tests.csproj
index 0d0daa697..c8d06b81d 100644
--- a/test/Cuemon.AspNetCore.Authentication.Tests/Cuemon.AspNetCore.Authentication.Tests.csproj
+++ b/test/Cuemon.AspNetCore.Authentication.Tests/Cuemon.AspNetCore.Authentication.Tests.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/test/Cuemon.AspNetCore.FunctionalTests/Cuemon.AspNetCore.FunctionalTests.csproj b/test/Cuemon.AspNetCore.FunctionalTests/Cuemon.AspNetCore.FunctionalTests.csproj
index c2c248461..48edbd10e 100644
--- a/test/Cuemon.AspNetCore.FunctionalTests/Cuemon.AspNetCore.FunctionalTests.csproj
+++ b/test/Cuemon.AspNetCore.FunctionalTests/Cuemon.AspNetCore.FunctionalTests.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/test/Cuemon.AspNetCore.Mvc.FunctionalTests/Cuemon.AspNetCore.Mvc.FunctionalTests.csproj b/test/Cuemon.AspNetCore.Mvc.FunctionalTests/Cuemon.AspNetCore.Mvc.FunctionalTests.csproj
index 6264b838a..eea39c04c 100644
--- a/test/Cuemon.AspNetCore.Mvc.FunctionalTests/Cuemon.AspNetCore.Mvc.FunctionalTests.csproj
+++ b/test/Cuemon.AspNetCore.Mvc.FunctionalTests/Cuemon.AspNetCore.Mvc.FunctionalTests.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/test/Cuemon.AspNetCore.Mvc.Tests/Cuemon.AspNetCore.Mvc.Tests.csproj b/test/Cuemon.AspNetCore.Mvc.Tests/Cuemon.AspNetCore.Mvc.Tests.csproj
index a47692442..b5153f73d 100644
--- a/test/Cuemon.AspNetCore.Mvc.Tests/Cuemon.AspNetCore.Mvc.Tests.csproj
+++ b/test/Cuemon.AspNetCore.Mvc.Tests/Cuemon.AspNetCore.Mvc.Tests.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/test/Cuemon.AspNetCore.Razor.TagHelpers.Tests/Cuemon.AspNetCore.Razor.TagHelpers.Tests.csproj b/test/Cuemon.AspNetCore.Razor.TagHelpers.Tests/Cuemon.AspNetCore.Razor.TagHelpers.Tests.csproj
index 41a1c7d33..d0435670f 100644
--- a/test/Cuemon.AspNetCore.Razor.TagHelpers.Tests/Cuemon.AspNetCore.Razor.TagHelpers.Tests.csproj
+++ b/test/Cuemon.AspNetCore.Razor.TagHelpers.Tests/Cuemon.AspNetCore.Razor.TagHelpers.Tests.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/test/Cuemon.AspNetCore.Tests/Cuemon.AspNetCore.Tests.csproj b/test/Cuemon.AspNetCore.Tests/Cuemon.AspNetCore.Tests.csproj
index 71de49c2d..18653a020 100644
--- a/test/Cuemon.AspNetCore.Tests/Cuemon.AspNetCore.Tests.csproj
+++ b/test/Cuemon.AspNetCore.Tests/Cuemon.AspNetCore.Tests.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/test/Cuemon.Data.SqlClient.Tests/Cuemon.Data.SqlClient.Tests.csproj b/test/Cuemon.Data.SqlClient.Tests/Cuemon.Data.SqlClient.Tests.csproj
index 81c1d0b7b..ae2f7746a 100644
--- a/test/Cuemon.Data.SqlClient.Tests/Cuemon.Data.SqlClient.Tests.csproj
+++ b/test/Cuemon.Data.SqlClient.Tests/Cuemon.Data.SqlClient.Tests.csproj
@@ -13,7 +13,7 @@
-
+
diff --git a/test/Cuemon.Data.Tests/Cuemon.Data.Tests.csproj b/test/Cuemon.Data.Tests/Cuemon.Data.Tests.csproj
index 291b121c7..3ebfe912a 100644
--- a/test/Cuemon.Data.Tests/Cuemon.Data.Tests.csproj
+++ b/test/Cuemon.Data.Tests/Cuemon.Data.Tests.csproj
@@ -57,7 +57,7 @@
-
+
diff --git a/test/Cuemon.Extensions.AspNetCore.Authentication.AwsSignature4.Tests/Cuemon.Extensions.AspNetCore.Authentication.AwsSignature4.Tests.csproj b/test/Cuemon.Extensions.AspNetCore.Authentication.AwsSignature4.Tests/Cuemon.Extensions.AspNetCore.Authentication.AwsSignature4.Tests.csproj
index 65f303f19..5ac61a999 100644
--- a/test/Cuemon.Extensions.AspNetCore.Authentication.AwsSignature4.Tests/Cuemon.Extensions.AspNetCore.Authentication.AwsSignature4.Tests.csproj
+++ b/test/Cuemon.Extensions.AspNetCore.Authentication.AwsSignature4.Tests/Cuemon.Extensions.AspNetCore.Authentication.AwsSignature4.Tests.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/test/Cuemon.Extensions.AspNetCore.Authentication.Tests/Cuemon.Extensions.AspNetCore.Authentication.Tests.csproj b/test/Cuemon.Extensions.AspNetCore.Authentication.Tests/Cuemon.Extensions.AspNetCore.Authentication.Tests.csproj
index 978378ff3..ddd24dcb3 100644
--- a/test/Cuemon.Extensions.AspNetCore.Authentication.Tests/Cuemon.Extensions.AspNetCore.Authentication.Tests.csproj
+++ b/test/Cuemon.Extensions.AspNetCore.Authentication.Tests/Cuemon.Extensions.AspNetCore.Authentication.Tests.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests.csproj b/test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests.csproj
index d0209e717..492a265dd 100644
--- a/test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests.csproj
+++ b/test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.Tests.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests.csproj b/test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests.csproj
index abd7a1c9e..43352190f 100644
--- a/test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests.csproj
+++ b/test/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.Tests.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/test/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests.csproj b/test/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests.csproj
index 17b3f54ba..77d2a4f8d 100644
--- a/test/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests.csproj
+++ b/test/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests/Cuemon.Extensions.AspNetCore.Mvc.RazorPages.Tests.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/test/Cuemon.Extensions.AspNetCore.Mvc.Tests/Cuemon.Extensions.AspNetCore.Mvc.Tests.csproj b/test/Cuemon.Extensions.AspNetCore.Mvc.Tests/Cuemon.Extensions.AspNetCore.Mvc.Tests.csproj
index 0558b0171..0b77d2539 100644
--- a/test/Cuemon.Extensions.AspNetCore.Mvc.Tests/Cuemon.Extensions.AspNetCore.Mvc.Tests.csproj
+++ b/test/Cuemon.Extensions.AspNetCore.Mvc.Tests/Cuemon.Extensions.AspNetCore.Mvc.Tests.csproj
@@ -13,7 +13,7 @@
-
+
diff --git a/test/Cuemon.Extensions.AspNetCore.Tests/Cuemon.Extensions.AspNetCore.Tests.csproj b/test/Cuemon.Extensions.AspNetCore.Tests/Cuemon.Extensions.AspNetCore.Tests.csproj
index 774b225a2..6008b9e88 100644
--- a/test/Cuemon.Extensions.AspNetCore.Tests/Cuemon.Extensions.AspNetCore.Tests.csproj
+++ b/test/Cuemon.Extensions.AspNetCore.Tests/Cuemon.Extensions.AspNetCore.Tests.csproj
@@ -18,7 +18,7 @@
-
+
diff --git a/test/Cuemon.Extensions.Core.Tests/StringExtensionsTest.cs b/test/Cuemon.Extensions.Core.Tests/StringExtensionsTest.cs
index bfe9ef4cc..5582c0b46 100644
--- a/test/Cuemon.Extensions.Core.Tests/StringExtensionsTest.cs
+++ b/test/Cuemon.Extensions.Core.Tests/StringExtensionsTest.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
-using System.Runtime.InteropServices;
using Cuemon.Collections.Generic;
using Codebelt.Extensions.Xunit;
using Xunit;
@@ -16,29 +15,6 @@ public StringExtensionsTest(ITestOutputHelper output) : base(output)
{
}
- [Fact]
- public void ReplaceLineEndings_ShouldReplaceNewLineOccurrences()
- {
- var lineEndings = "Windows has \r\n (CRLF) and Linux has \n (LF)";
-
- TestOutput.WriteLine($$"""
- Before: {{lineEndings}}
- After: {{lineEndings.ReplaceLineEndings()}}
- """);
-
- TestOutput.WriteLine(RuntimeInformation.OSDescription);
- TestOutput.WriteLine(RuntimeInformation.FrameworkDescription);
-
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
- {
- Assert.Equal("Windows has \n (CRLF) and Linux has \n (LF)", lineEndings.ReplaceLineEndings());
- }
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- Assert.Equal("Windows has \r\n (CRLF) and Linux has \r\n (LF)", lineEndings.ReplaceLineEndings());
- }
- }
-
[Fact]
public void Difference_ShouldGetDifference()
{
diff --git a/test/Cuemon.Extensions.Hosting.Tests/Cuemon.Extensions.Hosting.Tests.csproj b/test/Cuemon.Extensions.Hosting.Tests/Cuemon.Extensions.Hosting.Tests.csproj
index 429cf8038..3594a20ef 100644
--- a/test/Cuemon.Extensions.Hosting.Tests/Cuemon.Extensions.Hosting.Tests.csproj
+++ b/test/Cuemon.Extensions.Hosting.Tests/Cuemon.Extensions.Hosting.Tests.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/test/Cuemon.Extensions.Runtime.Caching.Tests/Cuemon.Extensions.Runtime.Caching.Tests.csproj b/test/Cuemon.Extensions.Runtime.Caching.Tests/Cuemon.Extensions.Runtime.Caching.Tests.csproj
index 4019c9e48..38f070a6a 100644
--- a/test/Cuemon.Extensions.Runtime.Caching.Tests/Cuemon.Extensions.Runtime.Caching.Tests.csproj
+++ b/test/Cuemon.Extensions.Runtime.Caching.Tests/Cuemon.Extensions.Runtime.Caching.Tests.csproj
@@ -9,7 +9,7 @@
-
+
\ No newline at end of file
diff --git a/test/Cuemon.Runtime.Caching.Tests/Cuemon.Runtime.Caching.Tests.csproj b/test/Cuemon.Runtime.Caching.Tests/Cuemon.Runtime.Caching.Tests.csproj
index edc55f7d9..29f02bb16 100644
--- a/test/Cuemon.Runtime.Caching.Tests/Cuemon.Runtime.Caching.Tests.csproj
+++ b/test/Cuemon.Runtime.Caching.Tests/Cuemon.Runtime.Caching.Tests.csproj
@@ -15,7 +15,7 @@
-
+
\ No newline at end of file