From a3f7515184f926d0f4f5a4f8c395ae46b1480526 Mon Sep 17 00:00:00 2001 From: "Eric Sibly [chullybun]" Date: Tue, 19 Nov 2024 14:32:07 -0800 Subject: [PATCH] v3.29.0 (#131) * v3.29.0 - *Enhancement:* Added `net9.0` support. - *Enhancement:* Deprecated `net7.0` support; no longer supported by [Microsoft](https://dotnet.microsoft.com/en-us/platform/support/policy). - *Enhancement:* Updated dependencies to latest; including transitive where applicable. * CI.yml update --- .github/workflows/CI.yml | 2 +- CHANGELOG.md | 5 +++ Common.targets | 2 +- CoreEx.sln | 1 + .../CoreEx.AspNetCore.csproj | 10 ++--- .../CoreEx.AutoMapper.csproj | 2 +- src/CoreEx.Azure/CoreEx.Azure.csproj | 5 ++- src/CoreEx.Cosmos/CoreEx.Cosmos.csproj | 5 ++- src/CoreEx.Data/CoreEx.Data.csproj | 4 +- .../CoreEx.Database.MySql.csproj | 4 +- .../CoreEx.Database.Postgres.csproj | 4 +- .../CoreEx.Database.SqlServer.csproj | 2 +- src/CoreEx.Database/CoreEx.Database.csproj | 2 +- src/CoreEx.Dataverse/CoreEx.Dataverse.csproj | 20 ++++++++- .../CoreEx.EntityFrameworkCore.csproj | 12 +++--- .../CoreEx.FluentValidation.csproj | 4 +- .../CoreEx.Newtonsoft.csproj | 2 +- src/CoreEx.OData/CoreEx.OData.csproj | 2 +- src/CoreEx.Solace/CoreEx.Solace.csproj | 4 +- .../CoreEx.UnitTesting.NUnit.csproj | 2 +- .../CoreEx.UnitTesting.csproj | 3 +- .../CoreEx.Validation.csproj | 2 +- src/CoreEx/CoreEx.csproj | 30 +++++++------- src/CoreEx/Entities/CompositeKey.cs | 41 +++++++++---------- src/CoreEx/Http/IHttpArgTypeArg.cs | 2 +- 25 files changed, 95 insertions(+), 77 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 117875be..8a0a5a58 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -42,8 +42,8 @@ jobs: dotnet-version: | 3.1.x 6.0.x - 7.0.x 8.0.x + 9.0.x - name: Restore dependencies run: dotnet restore diff --git a/CHANGELOG.md b/CHANGELOG.md index e9cdc4d0..8ea10c0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ Represents the **NuGet** versions. +## v3.29.0 +- *Enhancement:* Added `net9.0` support. +- *Enhancement:* Deprecated `net7.0` support; no longer supported by [Microsoft](https://dotnet.microsoft.com/en-us/platform/support/policy). +- *Enhancement:* Updated dependencies to latest; including transitive where applicable. + ## v3.28.0 - *Enhancement:* Added extended capabilities to the `InvokeArgs` to allow additional customization. diff --git a/Common.targets b/Common.targets index 2988c303..b8ab6622 100644 --- a/Common.targets +++ b/Common.targets @@ -1,6 +1,6 @@  - 3.28.0 + 3.29.0 preview Avanade Avanade diff --git a/CoreEx.sln b/CoreEx.sln index a65682d6..01545939 100644 --- a/CoreEx.sln +++ b/CoreEx.sln @@ -6,6 +6,7 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D5BD5701-A950-4E69-8EDA-F40CD0B47278}" ProjectSection(SolutionItems) = preProject CHANGELOG.md = CHANGELOG.md + .github\workflows\CI.yml = .github\workflows\CI.yml CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md Common.targets = Common.targets CONTRIBUTING.md = CONTRIBUTING.md diff --git a/src/CoreEx.AspNetCore/CoreEx.AspNetCore.csproj b/src/CoreEx.AspNetCore/CoreEx.AspNetCore.csproj index 8f4ebcae..22daba38 100644 --- a/src/CoreEx.AspNetCore/CoreEx.AspNetCore.csproj +++ b/src/CoreEx.AspNetCore/CoreEx.AspNetCore.csproj @@ -1,27 +1,25 @@  - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0 CoreEx.AspNetCore CoreEx CoreEx ASP.NET Core backend Extensions. CoreEx ASP.NET backend Extensions. coreex api aspnet entity microservices false + - + + - - - - diff --git a/src/CoreEx.AutoMapper/CoreEx.AutoMapper.csproj b/src/CoreEx.AutoMapper/CoreEx.AutoMapper.csproj index 5eb097f4..17cfcf32 100644 --- a/src/CoreEx.AutoMapper/CoreEx.AutoMapper.csproj +++ b/src/CoreEx.AutoMapper/CoreEx.AutoMapper.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0 + net6.0;net8.0;net9.0 CoreEx.Mapping CoreEx.AutoMapper CoreEx .NET AutoMapper Extensions. diff --git a/src/CoreEx.Azure/CoreEx.Azure.csproj b/src/CoreEx.Azure/CoreEx.Azure.csproj index b1d74da9..ea96605c 100644 --- a/src/CoreEx.Azure/CoreEx.Azure.csproj +++ b/src/CoreEx.Azure/CoreEx.Azure.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0 + net6.0;net8.0;net9.0 CoreEx.Azure CoreEx CoreEx .NET Azure Extensions. @@ -16,11 +16,12 @@ - + + diff --git a/src/CoreEx.Cosmos/CoreEx.Cosmos.csproj b/src/CoreEx.Cosmos/CoreEx.Cosmos.csproj index 37fcb0df..a8922b61 100644 --- a/src/CoreEx.Cosmos/CoreEx.Cosmos.csproj +++ b/src/CoreEx.Cosmos/CoreEx.Cosmos.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0;netstandard2.1 CoreEx.Cosmos CoreEx CoreEx .NET Cosmos DB extras. @@ -12,7 +12,8 @@ - + + diff --git a/src/CoreEx.Data/CoreEx.Data.csproj b/src/CoreEx.Data/CoreEx.Data.csproj index 41dbbe4b..19f8e4a7 100644 --- a/src/CoreEx.Data/CoreEx.Data.csproj +++ b/src/CoreEx.Data/CoreEx.Data.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0;netstandard2.1 CoreEx.Data CoreEx CoreEx .NET Data extras. @@ -12,7 +12,7 @@ - + diff --git a/src/CoreEx.Database.MySql/CoreEx.Database.MySql.csproj b/src/CoreEx.Database.MySql/CoreEx.Database.MySql.csproj index 28db6ec1..13f52eba 100644 --- a/src/CoreEx.Database.MySql/CoreEx.Database.MySql.csproj +++ b/src/CoreEx.Database.MySql/CoreEx.Database.MySql.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0;netstandard2.1 CoreEx.Database.MySql CoreEx CoreEx .NET MySQL Database extras. @@ -12,7 +12,7 @@ - + diff --git a/src/CoreEx.Database.Postgres/CoreEx.Database.Postgres.csproj b/src/CoreEx.Database.Postgres/CoreEx.Database.Postgres.csproj index 9d1727cb..b4dcef20 100644 --- a/src/CoreEx.Database.Postgres/CoreEx.Database.Postgres.csproj +++ b/src/CoreEx.Database.Postgres/CoreEx.Database.Postgres.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0 CoreEx.Database.Postgres CoreEx CoreEx .NET Postgres Database extras. @@ -12,7 +12,7 @@ - + diff --git a/src/CoreEx.Database.SqlServer/CoreEx.Database.SqlServer.csproj b/src/CoreEx.Database.SqlServer/CoreEx.Database.SqlServer.csproj index a6486b09..709bbc63 100644 --- a/src/CoreEx.Database.SqlServer/CoreEx.Database.SqlServer.csproj +++ b/src/CoreEx.Database.SqlServer/CoreEx.Database.SqlServer.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0;netstandard2.1 CoreEx.Database.SqlServer CoreEx CoreEx .NET SQL Server Database extras. diff --git a/src/CoreEx.Database/CoreEx.Database.csproj b/src/CoreEx.Database/CoreEx.Database.csproj index f5f267cf..851cd5cc 100644 --- a/src/CoreEx.Database/CoreEx.Database.csproj +++ b/src/CoreEx.Database/CoreEx.Database.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0;netstandard2.1 CoreEx.Database CoreEx CoreEx .NET Relational Database extras. diff --git a/src/CoreEx.Dataverse/CoreEx.Dataverse.csproj b/src/CoreEx.Dataverse/CoreEx.Dataverse.csproj index 959a2132..0e504ee7 100644 --- a/src/CoreEx.Dataverse/CoreEx.Dataverse.csproj +++ b/src/CoreEx.Dataverse/CoreEx.Dataverse.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0;net8.0 + net6.0;net8.0;net9.0 CoreEx.Dataverse CoreEx CoreEx .NET Microsoft Dataverse extras. @@ -12,7 +12,23 @@ - + + + + + + + + + + + + + + + + + diff --git a/src/CoreEx.EntityFrameworkCore/CoreEx.EntityFrameworkCore.csproj b/src/CoreEx.EntityFrameworkCore/CoreEx.EntityFrameworkCore.csproj index a41528c6..3dcb9db9 100644 --- a/src/CoreEx.EntityFrameworkCore/CoreEx.EntityFrameworkCore.csproj +++ b/src/CoreEx.EntityFrameworkCore/CoreEx.EntityFrameworkCore.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0 + net6.0;net8.0;net9.0 CoreEx.EntityFrameworkCore CoreEx CoreEx .NET Entity Framework Core (EF) extras. @@ -13,15 +13,15 @@ - + - - + + - - + + diff --git a/src/CoreEx.FluentValidation/CoreEx.FluentValidation.csproj b/src/CoreEx.FluentValidation/CoreEx.FluentValidation.csproj index 9a1732a8..800d49aa 100644 --- a/src/CoreEx.FluentValidation/CoreEx.FluentValidation.csproj +++ b/src/CoreEx.FluentValidation/CoreEx.FluentValidation.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0;netstandard2.1 CoreEx.FluentValidation CoreEx CoreEx .NET FluentValidation Extensions. @@ -10,7 +10,7 @@ - + diff --git a/src/CoreEx.Newtonsoft/CoreEx.Newtonsoft.csproj b/src/CoreEx.Newtonsoft/CoreEx.Newtonsoft.csproj index 58609146..b5f0bc80 100644 --- a/src/CoreEx.Newtonsoft/CoreEx.Newtonsoft.csproj +++ b/src/CoreEx.Newtonsoft/CoreEx.Newtonsoft.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0;netstandard2.1 CoreEx.Newtonsoft CoreEx CoreEx .NET Newtonsoft Extensions. diff --git a/src/CoreEx.OData/CoreEx.OData.csproj b/src/CoreEx.OData/CoreEx.OData.csproj index 627a521e..88295fb8 100644 --- a/src/CoreEx.OData/CoreEx.OData.csproj +++ b/src/CoreEx.OData/CoreEx.OData.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0;netstandard2.1 CoreEx.OData CoreEx CoreEx .NET OData extras. diff --git a/src/CoreEx.Solace/CoreEx.Solace.csproj b/src/CoreEx.Solace/CoreEx.Solace.csproj index 6d108327..434dc998 100644 --- a/src/CoreEx.Solace/CoreEx.Solace.csproj +++ b/src/CoreEx.Solace/CoreEx.Solace.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0;netstandard2.1 CoreEx.Solace CoreEx CoreEx .NET Standard Solace PubSub+ Extensions. @@ -10,7 +10,7 @@ - + diff --git a/src/CoreEx.UnitTesting.NUnit/CoreEx.UnitTesting.NUnit.csproj b/src/CoreEx.UnitTesting.NUnit/CoreEx.UnitTesting.NUnit.csproj index f2f8e8ba..1ee65143 100644 --- a/src/CoreEx.UnitTesting.NUnit/CoreEx.UnitTesting.NUnit.csproj +++ b/src/CoreEx.UnitTesting.NUnit/CoreEx.UnitTesting.NUnit.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0 + net6.0;net8.0;net9.0 UnitTestEx.NUnit CoreEx CoreEx NUnit UnitTesting extras. diff --git a/src/CoreEx.UnitTesting/CoreEx.UnitTesting.csproj b/src/CoreEx.UnitTesting/CoreEx.UnitTesting.csproj index e7be84e9..d7fa2771 100644 --- a/src/CoreEx.UnitTesting/CoreEx.UnitTesting.csproj +++ b/src/CoreEx.UnitTesting/CoreEx.UnitTesting.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0 + net6.0;net8.0;net9.0 UnitTestEx CoreEx CoreEx UnitTesting extras. @@ -18,7 +18,6 @@ - diff --git a/src/CoreEx.Validation/CoreEx.Validation.csproj b/src/CoreEx.Validation/CoreEx.Validation.csproj index a2a90828..58a627bb 100644 --- a/src/CoreEx.Validation/CoreEx.Validation.csproj +++ b/src/CoreEx.Validation/CoreEx.Validation.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0;netstandard2.1 CoreEx.Validation CoreEx CoreEx .NET Validation (Alternative). diff --git a/src/CoreEx/CoreEx.csproj b/src/CoreEx/CoreEx.csproj index c7d2368e..c64279a4 100644 --- a/src/CoreEx/CoreEx.csproj +++ b/src/CoreEx/CoreEx.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0;net8.0;netstandard2.1 + net6.0;net8.0;net9.0;netstandard2.1 CoreEx CoreEx CoreEx .NET backend Extensions. @@ -12,6 +12,19 @@ + + + + + + + + + + + + + @@ -25,19 +38,6 @@ - - - - - - - - - - - - - @@ -67,7 +67,7 @@ - + diff --git a/src/CoreEx/Entities/CompositeKey.cs b/src/CoreEx/Entities/CompositeKey.cs index d8e70071..73f133a7 100644 --- a/src/CoreEx/Entities/CompositeKey.cs +++ b/src/CoreEx/Entities/CompositeKey.cs @@ -195,7 +195,8 @@ public bool IsInitial /// Returns the as a comma-separated . /// /// The composite key as a . - /// Each value is JSON-formatted to ensure consistency and portability. + /// Each value is formatted in an invariant manner for portability and consistency. A null is formatted as . A + /// is written as-is, there is no special escaping et. performed. public override string? ToString() => ToString(','); /// @@ -217,32 +218,28 @@ public bool IsInitial if (i > 0) sb.Append(separator); - if (Args[i] is not null) - sb.Append(ConvertArgToString(Args[i])); + if (Args[i] is null) + continue; + + switch (Args[i]!.GetType()) + { + case Type t when t == typeof(int) || t == typeof(long) || t == typeof(short) || t == typeof(uint) || t == typeof(ulong) || t == typeof(ushort): + sb.AppendFormat(NumberFormatInfo.InvariantInfo, "{0}", Args[i]); + break; + + case Type t when t == typeof(DateTime) || t == typeof(DateTimeOffset): + sb.AppendFormat(DateTimeFormatInfo.InvariantInfo, "{0:O}", Args[i]); + break; + + default: + sb.Append(Args[i]); + break; + } } return sb.ToString(); } - /// - /// Convert the argument to a string. - /// - private static string ConvertArgToString(object? arg) => arg switch - { - string str => str, - char c => c.ToString(), - Guid g => g.ToString(), - int i => i.ToString(NumberFormatInfo.InvariantInfo), - long l => l.ToString(NumberFormatInfo.InvariantInfo), - short s => s.ToString(NumberFormatInfo.InvariantInfo), - DateTime d => d.ToString("O"), - DateTimeOffset o => o.ToString("O"), - uint ui => ui.ToString(NumberFormatInfo.InvariantInfo), - ulong ul => ul.ToString(NumberFormatInfo.InvariantInfo), - ushort us => us.ToString(NumberFormatInfo.InvariantInfo), - _ => throw new InvalidOperationException($"Type {arg!.GetType().Name} is not supported for a {nameof(ToString)}.") - }; - /// /// Returns the as a JSON . /// diff --git a/src/CoreEx/Http/IHttpArgTypeArg.cs b/src/CoreEx/Http/IHttpArgTypeArg.cs index 41d4a719..fc6f3103 100644 --- a/src/CoreEx/Http/IHttpArgTypeArg.cs +++ b/src/CoreEx/Http/IHttpArgTypeArg.cs @@ -20,7 +20,7 @@ public interface IHttpArgTypeArg : IHttpArg public HttpArgType ArgType { get; } /// - /// Returns a representation of the value for URI template replacement use. + /// Returns a representation of the value for URI template replacement use. /// /// The escaped data string. string? ToEscapeDataString();