1
0
Files
common/CHANGELOG.md
Andreas Müller 5d606bea89
All checks were successful
Branch Build / build-test-deploy (push) Successful in 1m46s
Migrated CI from gitlab to gitea
2026-01-12 20:26:51 +01:00

15 KiB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Upcoming - 0000-00-00

Diffs

Added

  • Added extensions for ViewContext (IsActive and IsAreaActive)

Changed

  • UseDatabaseProvider() throws DatabaseProviderException with more specific message content
  • Migrated repository from Gitlab to Gitea

v2.1.0, asp/v3.1.0, efc/v3.1.0, msgpack/v1.0.0, test/v2.2.0 - 2025-11-24

Diffs

Added

  • .AddRange() for collections
  • .AddIfNotNull() for collections
  • DomainComparer ordering alphabetically from TLD to sub-domain
  • IPAddressComparer able to compare IPv4 and IPv6
  • VersionStringComparer to compare version strings (SemVer)
  • ContainsAny() and ContainsAll() for strings
  • ASPNETCORE_APPL_PROXY environment variable can be used on proxy configuration
  • Support for .NET 10.0 LTS
  • ToCleanString() for IPAddresses mapped IPv4 to IPv6
  • ToSubnetMask() to generated IPv4 subnet masks from CIDR notation
  • ObfuscateIpAddress() to mask sensidive parts of an IP address (e.g. for listing in logs)
  • ArchiveHelper to create zip or tar.gz archives from a list of ArchiveFiles (net8.0/net10.0)

Changed

  • Solution restructured to use multiple test projects
  • Optimized for C# 14
  • IPNetwork is used from (as Microsoft.AspNetCore.HttpOverrides is tagged as "out of support"):
    • .NET Standard 2.0: Microsoft.AspNetCore.HttpOverrides.IPNetwork
    • .NET 8.0 and later: System.Net.IPNetwork
  • Moved MessagePack formatter extensions to own package AMWD.Common.MessagePack
  • GetAlignedInterval() (without Local/Utc) is now public accessible
  • Using native Convert.FromHexString on .NET 8.0 and later on HexToBytes extension

Removed

  • GetDisplayName for enum values was removed
  • Support for .NET 6.0 LTS

asp/v3.0.0, efc/v3.0.0 - 2023-12-28

Diffs

Added

  • Support for .NET 8.0 LTS

Changed

  • Renamed all private members to start with an underscore
  • Split "Add DateOnly and TimeOnly converters" into two extension methods

asp/v2.2.0 - 2023-12-05

Diffs

Changed

  • Using AddHostedService<>() with "implementation factory" for AddSingletonHostedService<>() to resove singleton instance
  • GetRemoteIpAddress() converts a mixed IPv4 address on IPv6 (e.g. ::ffff:127.0.0.1) to a clean IPv4 address (e.g. 127.0.0.1)

Removed

  • Removed BackgroundServiceStarter

v2.0.1, asp/v2.1.0, efc/v2.0.1, test/v2.1.1 - 2023-11-23

Diffs

Added

  • Added ConfigureAwait(false) to async calls where appropriate
  • Added localhost and private IPv6 subnet to UseProxyHosting()

Changed

  • Changed order of header evaluation for remote IP address parsing: Cf-Connecting-Ip, X-Real-IP, X-Forwarded-For

Fixed

  • GetRemoteIpAddress() is able to get address when multiple proxies are used

test/v2.1.0 - 2023-10-13

Diffs

Added

  • Added SnapshotAssert for better UnitTesting

Changed

  • Moved AMWD.Common.Moq to AMWD.Common.Test

v2.0.0 - 2023-08-08

Added

  • CommandLineParser as alternative to the ConfigurationBuilder.AddCommandLine from Microsoft

Removed

  • Support for .NET Core 3.1

v1.13.0 - 2023-06-27

Added

  • ProtectedPathMiddleware to secure even static file paths

Changed

  • Moved BasicAuthentication* into sub-namespace Security

v1.12.0 - 2023-06-01

Changed

  • Renamed IPBlacklistAttribute to IPBlockListAttribute
  • Renamed IPWhitelistAttribute to IPAllowListAttribute
  • HttpContextExtensions
    • GetAntiforgeryToken() now returns the header name also
    • GetRemoteIpAddress() checks following additional headers by default:
      • X-Forwarded-For
      • X-Real-IP
      • CF-Connecting-IP

v1.11.1 - 2023-05-11

Fixed

  • JsonExtensions.GetValue<T>() now is case insensitive and detects the correct property name of a JObject.

v1.11.0 - 2023-03-29

Added

  • directory.build.props and directory.build.targets
  • GetDisplayName() extension for enums (DisplayAttribute(Name = ""))
  • FileLogger as additional ILogger implementation (from Microsoft.Extensions.Logging)
  • StartTransaction(Async) as DbContext extensions; prevents exceptions on InMemory database

v1.10.0 - 2022-09-18

Fixed

  • Over-/Underflow behaviour for IPAddress de-/increment
  • Await behaviour for AsyncQueue (not required to marshal back to the original captured context)

Removed

  • Removing dependency from DNS package It's now used via reflection when possible (otherwise exeption)

v1.9.0 - 2022-08-14

Added

  • AsyncQueue<T> to AMWD.Common.Utilities with namespace System.Collections.Generic

v1.8.1 - 2022-08-07

Fixed

  • UnitTests
  • BasicAuthentication modules now all use the cancellation token

v1.8.0 - 2022-08-07

Added

  • Converters for Newtonsoft.Json
    • ByteArrayHexConverter to get an byte array as hex string instead of Base64
    • IPAddressConverter to make System.Net.IPAdresses (and list forms) serializable
    • IPNetworkConverter to make Microsoft.AspNetCore.HttpOverrides.IPNetwork (and list forms) serializable
  • Formatters for MessagePack
    • IPAddressFormatter to serialize an System.Net.IPAddress
    • IPAddressArrayFormatter to serialize arrays of System.Net.IPAddresses
    • IPAddressListFormatter to serialize lists of System.Net.IPAddresses
    • IPNetworkFormatter to serialize an Microsoft.AspNetCore.HttpOverrides.IPNetwork
    • IPNetworkArrayFormatter to serialize arrays of Microsoft.AspNetCore.HttpOverrides.IPNetwork
    • IPNetworkListFormatter to serialize lists of Microsoft.AspNetCore.HttpOverrides.IPNetwork

Changed

  • IBasicAuthenticationValidator has the possibillity to cancel the operation

v1.7.0 - 2022-07-24

Added

  • UnitTests for AspNetCore as far as testable without massive work
  • IPAddress.Increment and IPAddress.Decrement extensions
  • NetworkHelper.ParseNetwork and NetworkHelper.TryParseNetwork to parse a CIDR (e.g. 192.168.178.0/24) network
  • IPNetwork.ExpandNetwork to create a list with all contained IPAddresses

Changed

  • BasicAuthenticationAttribute now respects the IBasicAuthenticationValidator.Realm when the own Realm property is not set
  • CI scripts
  • Updated all package references to latest builds (as on 2022-07-23)

Removed

  • IBasicAuthenticationValidator.Realm is now a read-only property (removed public set)

v1.6.1 - 2022-06-23

Added

  • BasicAuthenticationAttribute sets the HttpContext.User property when successfully validated

Changed

  • Moved BasicAuthenticationAttribute from ActionFilter to IAsyncAuthorizationFilter

Fixed

  • TimeSpan.ToShortString() is now capable of negative values

v1.6.0 - 2022-06-22

Changed

  • All attributes now reside in Microsoft.AspNetCore.Mvc.Filters namespace

Fixed

  • Fixed BasicAuthenticationAttribute

v1.5.3 - 2022-06-22

Changed

  • BasicAuthenticationAttribute is now in namespace AMWD.Common.AspNetCore.Attributes

Fixed

  • Fixed problem with ForbidResult without having an authentication schema defined Now only HTTP Status 403 (Forbid) is returned

v1.5.2 - 2022-06-20

Removed

v1.5.1 - 2022-06-20

Changed

  • Changed from Assembly.GetExecutingAssmebly().Location to AppContext.BaseDirectory due to single-file applications

v1.5.0 - 2022-06-15

Added

  • TcpClientMoq to test communication via a TcpClient
  • EntityFramework Core Converters for new DateOnly and TimeOnly datatypes when using SQL Server on .NET 6.0 (Bug on Microsoft's EntityFramework)
  • HttpContext.IsLocalRequest() to determine whether the request was from local or remote
  • IPWhitelistAttribute and IPBlacklistAttribute to allow/restrict access on specific controllers/actions

v1.4.3 - 2022-05-12

Fixed

  • Fixed detection of SQLServer for EFCore extensions

v1.4.2 - 2022-05-06

Added

  • New extension for StringBuilder AppendLine(value: string, newLine: string) to add a line with a explicit defined new line character

v1.4.1 - 2022-03-23

Added

  • IntegrityHashTagHelper can be used with asp-integrity="true|false" and asp-integrity-strength="256|384|512"
  • WaitAvailableAsync can be used to wait for a database connection to be available

Changed

  • ApplyMigrationsAsync uses WaitAvailableAsync internally

Fixed

  • InMemory database provider does not fail on "migration" (none possible)

v1.4.0 - 2022-02-11

Added

  • New NuGet package AMWD.Common.Moq with HttpRequestHandlerMoq class
  • Supporting InMemory Database as provider

Changed

  • Enhanced Stopwatch/Timer delta due to unsharp resolution using timers
  • IBasicAuthenticationValidator now also provides the realm as property (resolving a string on DI is bad style)

v1.3.0 - 2021-12-21

Added

  • BasicAuthenticationHandler to use instead of other handlers (instead of e.g. CookieAuthentication)
  • BasicAuthenticationAttribute to restrict single actions

Changed

  • Simplified package references on AspNetCore
  • Changed NuGet package DnsClient to DNS

v1.2.0 - 2021-12-19

Added

  • CHANGELOG
  • HtmlHelper.IsDarkColor to classify a color as dark or light one (by luminance)
  • ReadLine and ReadLineAsync as StreamExtensions

Changed

  • Unit-Tests enhanced
  • Unit-Tests excluded from code coverage calcualtion
  • Updated NuGet package NetRevisionTask

v1.1.0 - 2021-11-22

Added

  • AddSingletonHostedService<TService, TImplementation> using an interface and an implementation type
  • Unit-Tests for AMWD.Common (ca. 60% Branch-Coverage, target: above 90%)
  • IsValidEmailAddress check whether a string is a valid email address, optionally with DNS check (MX record)
  • AES and 3DES De-/Encrypt enhanced for string to string (plain/base64)

Changed

  • CI Build-Process splitted into: build, test, deploy
  • GetAlignedInterval splitted into GetAlignedIntervalUtc and GetAlignedIntervalLocal to respect daylight saving times
  • HexToBytes checks for valid characters by using RegEx

Fixed

  • Sha256 as string extension

v1.0.2 - 2021-11-09

Added

  • .NET 6.0 (LTS) compatibility
  • Versioning in README

Changed

  • CI Build modified
  • C# Update from 9.0 to 10.0

Fixed

  • Comments updated / enhanced

v1.0.1 - 2021-10-25

Added

  • ParseDecimal added to prevent problems with comma/dot as decimal separator

Changed

  • NuGet packages reside on artifacts/

Fixed

  • MySQL library is now working correctly via reflection

v1.0.0 - 2021-10-24

Added

  • Lizenz
  • Readme

Changed

  • CustomFloatingPointModelBinder* renamed to InvariantFloatingPointModelBinder*
  • ResolveHost returns a list of resolved ip addresses
  • ResolveInterface returns a list of resolved ip addresses

Removed

  • IPAddress fallback parameter removed from ResolveHost
  • IPAddress fallback parameter removed from ResolveInterface
  • ResolveInterface does not use DNS to resolve the input (kind a weired behaviour)

v0.0.2 - 2021-10-23

Added

  • NuGet packages have an icon

Changed

  • Additional information for NuGet packages

v0.0.1 - 2021-10-23

Initial release