Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
33c6989
:arrow_up: bump dependencies
gimlichael Sep 30, 2024
731cf3d
:construction_worker: updated CI/CD pipeline
gimlichael Sep 30, 2024
a4bf7a5
:sparkles: support for converting IHeaderDictionary
gimlichael Oct 3, 2024
b0c76f7
:bug: fixed Read so it uses JsonSerializerOptions
gimlichael Oct 3, 2024
1091da0
:sparkles: added Clone extension method for JsonSerializerOptions
gimlichael Oct 3, 2024
96153f6
:sparkles: added generic RemoveAllOf{T} and RemoveAllOf extension met…
gimlichael Oct 3, 2024
8d660b6
:twisted_rightwards_arrows: replaced Newtonsoft.Json with System.Text…
gimlichael Oct 3, 2024
a5273bd
:twisted_rightwards_arrows: replaced Newtonsoft.Json with System.Text…
gimlichael Oct 3, 2024
2d40a71
:twisted_rightwards_arrows: replaced Newtonsoft.Json with System.Text…
gimlichael Oct 3, 2024
1a47c4b
:twisted_rightwards_arrows: replaced Newtonsoft.Json with System.Text…
gimlichael Oct 4, 2024
2e4c7ce
:heavy_minus_sign: remove left-over .net6 TFM
gimlichael Oct 4, 2024
bce7fb0
:heavy_plus_sign: added support for netstandard2.0 TFM
gimlichael Oct 4, 2024
601952c
:coffin: remove TFM net6.0 preprocessor directives
gimlichael Oct 4, 2024
4f57adf
:arrow_up: bump dependencies
gimlichael Oct 4, 2024
600f2f3
:twisted_rightwards_arrows: replaced Newtonsoft.Json with System.Text…
gimlichael Oct 4, 2024
c52e513
:arrow_up: depedency bump and simplification
gimlichael Oct 4, 2024
dba5695
:speech_balloon: updated community health pages
gimlichael Oct 4, 2024
6e3a9e1
:package: updated NuGet package definition
gimlichael Oct 4, 2024
a4f52f3
:twisted_rightwards_arrows: replaced Newtonsoft.Json with System.Text…
gimlichael Oct 4, 2024
28bd1cf
:twisted_rightwards_arrows: replaced Newtonsoft.Json with System.Text…
gimlichael Oct 4, 2024
5185791
:twisted_rightwards_arrows: replaced Newtonsoft.Json with System.Text…
gimlichael Oct 4, 2024
39006c1
:twisted_rightwards_arrows: replaced Newtonsoft.Json with System.Text…
gimlichael Oct 4, 2024
87b2a8d
:twisted_rightwards_arrows: replaced Newtonsoft.Json with System.Text…
gimlichael Oct 4, 2024
d196290
:alembic: test fails only in CI/CD - extend logging
gimlichael Oct 4, 2024
e425ff2
:alembic: no clue what is going on - test passes - but fails (no info…
gimlichael Oct 5, 2024
f001ea4
:alembic: removed privateassets=all (maybe that is the issue)
gimlichael Oct 5, 2024
cb0dba9
:bug: fix for one failing on linux and the other non-needed wait delay
gimlichael Oct 5, 2024
bdabab3
:alembic: should work without signing (as before pre-v9)
gimlichael Oct 5, 2024
add3052
:alembic: weird shit going on (RunConfiguration.DisableAppDomain=true)
gimlichael Oct 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 5 additions & 22 deletions .github/workflows/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
"src/**/Cuemon.Extensions.Reflection.csproj"
"src/**/Cuemon.Extensions.Runtime.Caching.csproj"
"src/**/Cuemon.Extensions.Text.csproj"
"src/**/Cuemon.Extensions.Text.Json.csproj"
"src/**/Cuemon.Extensions.Threading.csproj"
"src/**/Cuemon.Extensions.Xml.csproj"
"src/**/Cuemon.IO.csproj"
Expand Down Expand Up @@ -197,13 +198,6 @@ jobs:
with:
includePreview: true

- name: Download cuemon.snk file
uses: codebeltnet/gcp-download-file@v1
with:
serviceAccountKey: ${{ secrets.GCP_TOKEN }}
bucketName: ${{ secrets.GCP_BUCKETNAME }}
objectName: cuemon.snk

- name: Install .NET Tool - Report Generator
uses: codebeltnet/dotnet-tool-install-reportgenerator@v1

Expand All @@ -223,7 +217,8 @@ jobs:
projects: ${{ matrix.project }}
configuration: ${{ matrix.configuration }}
restoreCacheKey: ${{ runner.os == 'Linux' && needs.prepare_linux.outputs.restoreCacheKey || needs.prepare_windows.outputs.restoreCacheKey }}
level: normal
buildSwitches: -p:SkipSignAssembly=true
testArguments: -- RunConfiguration.DisableAppDomain=true
env:
CONNECTIONSTRINGS__ADVENTUREWORKS: ${{ secrets.DB_ADVENTUREWORKS }}

Expand All @@ -247,13 +242,6 @@ jobs:
with:
includePreview: true

- name: Download cuemon.snk file
uses: codebeltnet/gcp-download-file@v1
with:
serviceAccountKey: ${{ secrets.GCP_TOKEN }}
bucketName: ${{ secrets.GCP_BUCKETNAME }}
objectName: cuemon.snk

- name: Install .NET Tool - Sonar Scanner
uses: codebeltnet/dotnet-tool-install-sonarscanner@v1

Expand All @@ -275,6 +263,7 @@ jobs:
uses: codebeltnet/dotnet-build@v2
with:
uploadBuildArtifact: false
buildSwitches: -p:SkipSignAssembly=true

- name: Finalize SonarCloud Analysis
uses: codebeltnet/sonarcloud-scan-finalize@v1
Expand Down Expand Up @@ -310,13 +299,6 @@ jobs:
with:
includePreview: true

- name: Download cuemon.snk file
uses: codebeltnet/gcp-download-file@v1
with:
serviceAccountKey: ${{ secrets.GCP_TOKEN }}
bucketName: ${{ secrets.GCP_BUCKETNAME }}
objectName: cuemon.snk

- name: Restore Dependencies
uses: codebeltnet/dotnet-restore@v2
with:
Expand All @@ -330,6 +312,7 @@ jobs:
uses: codebeltnet/dotnet-build@v2
with:
uploadBuildArtifact: false
buildSwitches: -p:SkipSignAssembly=true

- name: Finalize CodeQL SAST Analysis
uses: codebeltnet/codeql-scan-finalize@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Availability: .NET 9 and .NET 8
- REMOVED Support for TFM .NET 6 (LTS)

# Improvements
- EXTENDED JsonConverterCollectionExtensions class in the Cuemon.Extensions.AspNetCore.Text.Json.Converters namespace to include one new extension method: AddProblemDetailsConverter
- EXTENDED JsonConverterCollectionExtensions class in the Cuemon.Extensions.AspNetCore.Text.Json.Converters namespace to include two new extension methods: AddProblemDetailsConverter and AddHeaderDictionaryConverter

Version 8.3.2
Availability: .NET 8 and .NET 6
Expand Down
9 changes: 7 additions & 2 deletions .nuget/Cuemon.Extensions.Text.Json/PackageReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
Version 9.0.0
Availability: .NET 9 and .NET 8
Availability: .NET 9, .NET 8 and .NET Standard 2.0

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
- REMOVED Support for TFM .NET 6 (LTS)
- ADDED Support for TFM .NET Standard 2.0

# New Features
- ADDED FailureConverter class in the Cuemon.Extensions.Text.Json.Converters namespace to convert FailureConverter to JSON

# Improvements
- EXTENDED JsonConverterCollectionExtensions class in the Cuemon.Extensions.Text.Json.Converters namespace to include one new extension method: AddFailureConverter
- EXTENDED JsonConverterCollectionExtensions class in the Cuemon.Extensions.Text.Json.Converters namespace to include three new extension methods: AddFailureConverter, RemoveAllOf and RemoveAllOf{T}
- EXTENDED JsonSerializerOptionsExtensions class in the Cuemon.Extensions.Text.Json namespace to include one new extension method: Clone

# Bug Fixes
- FIXED ExceptionConverter class in the Cuemon.Extensions.Text.Json.Converters namespace to use JsonSerializerOptions when converting JSON to Exception

Version 8.3.2
Availability: .NET 8 and .NET 6
Expand Down
11 changes: 7 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ For more details, please refer to `PackageReleaseNotes.txt` on a per assembly ba
## [9.0.0] - TBD (sometime in November 2024)

This major release is first and foremost focused on ironing out any wrinkles that have been introduced with .NET 9 preview releases so the final release is production ready together with the official launch from Microsoft.

Next focus point will be ensuring a consistent developer experience while ironing out some of the more stale legacy code in the project.

Expect breaking changes with this major release.

New features:
Expand Down Expand Up @@ -37,6 +39,11 @@ Removed features:
- TestOutputHelperAccessor class in the Cuemon.Extensions.Xunit namespace that provides a default implementation of the ITestOutputHelper interface
- ServiceProviderExtensions class in the Cuemon.Extensions.Xunit.Hosting namespace that consist of one extension method for the IServiceProvider interface: GetRequiredScopedService
- ServiceCollectionExtensions class in the Cuemon.Extensions.Xunit.Hosting namespace was extended with three new extension methods for the IServiceCollection interface: AddXunitTestOutputHelperAccessor, AddXunitTestOutputHelperAccessor{T} and an overload of AddXunitTestOutputHelperAccessor
- JsonConverterCollectionExtensions class in the Cuemon.Extensions.AspNetCore.Text.Json.Converters namespace to include two new extension methods: AddProblemDetailsConverter and AddHeaderDictionaryConverter
- XmlConverterExtensions class in the Cuemon.Extensions.AspNetCore.Xml.Converters namespace was extended to include one new extension method: AddProblemDetailsConverter
- XmlConverterExtensions class in the Cuemon.Extensions.Xml.Serialization.Converters namespace was extended to include one new extension method: AddFailureConverter
- JsonConverterCollectionExtensions class in the Cuemon.Extensions.Text.Json.Converters namespace was extended to include three new extension methods: AddFailureConverter, RemoveAllOf and RemoveAllOf{T}
- JsonSerializerOptionsExtensions class in the Cuemon.Extensions.Text.Json namespace was extended to include one new extension method: Clone

### Changed

Expand Down Expand Up @@ -81,11 +88,7 @@ Removed features:
- FaultDescriptorFilter class in the Cuemon.AspNetCore.Mvc.Filters.Diagnostics namespace to support preferred fault descriptor (e.g., FaultDetails or ProblemDetails)
- FaultDescriptorOptions class in the Cuemon.AspNetCore.Diagnostics namespace to include a property named FaultDescriptor (PreferredFaultDescriptor); default is PreferredFaultDescriptor.FaultDetails
- HttpExceptionDescriptor class in the Cuemon.AspNetCore.Diagnostics namespace to include two new properties; Instance (Uri) and TraceId (string)
- JsonConverterCollectionExtensions class in the Cuemon.Extensions.AspNetCore.Text.Json.Converters namespace was extended to include one new extension method: AddProblemDetailsConverter
- XmlConverterExtensions class in the Cuemon.Extensions.AspNetCore.Xml.Converters namespace was extended to include one new extension method: AddProblemDetailsConverter
- ApplicationBuilderExtensions class in the Cuemon.Extensions.AspNetCore.Diagnostics namespace to support preferred fault descriptor (e.g., FaultDetails or ProblemDetails) in the UseFaultDescriptorExceptionHandler extension method
- JsonConverterCollectionExtensions class in the Cuemon.Extensions.Text.Json.Converters namespace was extended to include one new extension method: AddFailureConverter
- XmlConverterExtensions class in the Cuemon.Extensions.Xml.Serialization.Converters namespace was extended to include one new extension method: AddFailureConverter
- XmlConverter{T} class in the Cuemon.Xml.Serialization.Converters namespace to use generic type T with two new abstract methods: WriteXml and ReadXml
- CultureInfoExtensions class in the Cuemon.Extensions.Globalization namespace to use Codebelt.Extensions.YamlDotNet assembly instead of previously built-in YAML support from Codebelt.Extensions.YamlDotNet assembly

Expand Down
7 changes: 4 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.10.0" Condition="$(TargetFramework.StartsWith('net4')) AND '$(IsLinux)' == 'true'" />
<PackageReference Include="xunit" Version="2.9.1" />
<PackageReference Include="xunit.runner.console" Version="2.9.1" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.console" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -93,6 +93,7 @@
</ItemGroup>

<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageReference Include="Codebelt.Extensions.Xunit" Version="9.0.0-preview.4" />
<PackageReference Include="Codebelt.Extensions.Xunit" Version="9.0.0-preview.8" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

<Target Name="ApplyFileVersion" AfterTargets="MinVer">
<PropertyGroup>
<BUILD_BUILDNUMBER Condition="'$(BUILD_BUILDNUMBER)' == ''">00000</BUILD_BUILDNUMBER>
<FileVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(BUILD_BUILDNUMBER)</FileVersion>
<GITHUB_RUN_NUMBER Condition="'$(GITHUB_RUN_NUMBER)' == ''">0</GITHUB_RUN_NUMBER>
<FileVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(GITHUB_RUN_NUMBER)</FileVersion>
</PropertyGroup>
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@ namespace Cuemon.AspNetCore.Authentication.Basic
/// <seealso cref="AuthenticationHandler{TOptions}" />
public class BasicAuthenticationHandler : AuthenticationHandler<BasicAuthenticationOptions>
{
#if NET6_0
/// <summary>
/// Initializes a new instance of the <see cref="BasicAuthenticationHandler"/> class.
/// </summary>
/// <param name="options">The monitor for the options instance.</param>
/// <param name="logger">The <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory" />.</param>
/// <param name="encoder">The <see cref="T:System.Text.Encodings.Web.UrlEncoder" />.</param>
/// <param name="clock">The <see cref="T:Microsoft.AspNetCore.Authentication.ISystemClock" />.</param>
public BasicAuthenticationHandler(IOptionsMonitor<BasicAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock)
{
}
#else
/// <summary>
/// Initializes a new instance of the <see cref="BasicAuthenticationHandler"/> class.
/// </summary>
Expand All @@ -38,7 +26,6 @@ public BasicAuthenticationHandler(IOptionsMonitor<BasicAuthenticationOptions> op
public BasicAuthenticationHandler(IOptionsMonitor<BasicAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
{
}
#endif

/// <summary>
/// Handle authenticate as an asynchronous operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,6 @@ public class DigestAuthenticationHandler : AuthenticationHandler<DigestAuthentic
{
private readonly INonceTracker _nonceTracker;

#if NET6_0
/// <summary>
/// Initializes a new instance of the <see cref="DigestAuthenticationHandler"/> class.
/// </summary>
/// <param name="options">The monitor for the options instance.</param>
/// <param name="logger">The <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory" />.</param>
/// <param name="encoder">The <see cref="T:System.Text.Encodings.Web.UrlEncoder" />.</param>
/// <param name="clock">The <see cref="T:Microsoft.AspNetCore.Authentication.ISystemClock" />.</param>
/// <param name="nonceTracker">The dependency injected implementation of an <see cref="INonceTracker"/>.</param>
public DigestAuthenticationHandler(IOptionsMonitor<DigestAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, INonceTracker nonceTracker = null) : base(options, logger, encoder, clock)
{
_nonceTracker = nonceTracker;
}
#else
/// <summary>
/// Initializes a new instance of the <see cref="DigestAuthenticationHandler"/> class.
/// </summary>
Expand All @@ -45,7 +31,6 @@ public DigestAuthenticationHandler(IOptionsMonitor<DigestAuthenticationOptions>
{
_nonceTracker = nonceTracker;
}
#endif

/// <summary>
/// Handle authenticate as an asynchronous operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@ namespace Cuemon.AspNetCore.Authentication.Hmac
/// <seealso cref="AuthenticationHandler{TOptions}" />
public class HmacAuthenticationHandler : AuthenticationHandler<HmacAuthenticationOptions>
{
#if NET6_0
/// <summary>
/// Initializes a new instance of the <see cref="HmacAuthenticationHandler"/> class.
/// </summary>
/// <param name="options">The monitor for the options instance.</param>
/// <param name="logger">The <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory" />.</param>
/// <param name="encoder">The <see cref="T:System.Text.Encodings.Web.UrlEncoder" />.</param>
/// <param name="clock">The <see cref="T:Microsoft.AspNetCore.Authentication.ISystemClock" />.</param>
public HmacAuthenticationHandler(IOptionsMonitor<HmacAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock)
{
}
#else
/// <summary>
/// Initializes a new instance of the <see cref="HmacAuthenticationHandler"/> class.
/// </summary>
Expand All @@ -37,7 +25,6 @@ public HmacAuthenticationHandler(IOptionsMonitor<HmacAuthenticationOptions> opti
public HmacAuthenticationHandler(IOptionsMonitor<HmacAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
{
}
#endif

/// <summary>
/// Handle authenticate as an asynchronous operation.
Expand Down
2 changes: 0 additions & 2 deletions src/Cuemon.Core.App/Cuemon.Core.App.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
<ProjectGuid>230bdf91-e7c7-4cb4-a39d-e1a5374c5602</ProjectGuid>
</PropertyGroup>

Expand Down Expand Up @@ -41,7 +40,6 @@
<ProjectReference Include="..\Cuemon.Security.Cryptography\Cuemon.Security.Cryptography.csproj" />
<ProjectReference Include="..\Cuemon.Threading\Cuemon.Threading.csproj" />
<ProjectReference Include="..\Cuemon.Xml\Cuemon.Xml.csproj" />
<ProjectReference Include="..\Cuemon.Xml\Cuemon.Xml.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Cuemon.Core/StringFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static class StringFactory
public static string CreateHexadecimal(byte[] value)
{
Validator.ThrowIfNull(value);
#if NET6_0_OR_GREATER
#if NET8_0_OR_GREATER
return Convert.ToHexString(value).Replace("-", "").ToLowerInvariant();
#else
return BitConverter.ToString(value).Replace("-", "").ToLowerInvariant();
Expand Down
1 change: 1 addition & 0 deletions src/Cuemon.Extensions.AspNetCore.Text.Json/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ internal static void Initialize()
{
list.AddStringValuesConverter();
list.AddProblemDetailsConverter();
list.AddHeaderDictionaryConverter();
};
}
}
Expand Down
Loading