Skip to content

v4.1.0

Choose a tag to compare

@senrecep senrecep released this 06 Oct 12:23
· 307 commits to main since this release

Added

  • New package CSharpEssentials.Endpoints: source-generated endpoint registries (IEndpoint, IEndpointGroup, [EndpointGroup]), a reflection fallback (MapEndpointsFromAssemblies), RouteOf<TEndpoint>, RequireRoles/RequirePolicies/RequireAuthSchemes, and analyzers CSE1001 to CSE1011 with a code fix for CSE1004. See the Readme, including a migration guide from Carter.
  • New package CSharpEssentials.DependencyInjection: [RegisterScoped]/[RegisterSingleton]/[RegisterTransient] with keys, As and Strategy, [Decorates], runtime Decorate/TryDecorate, a reflection fallback (AddServicesFromAssemblies), and analyzers CSE2001 to CSE2009 with a code fix for CSE2003. See the Readme, including a migration guide from Scrutor.
  • CSharpEssentials.AspNetCore: MapVersionedGroup(version) and the WithValidation<T>() endpoint filter for CSharpEssentials.Validation validators. The package now depends on CSharpEssentials.Validation.
  • CSharpEssentials.Core: IsBetween (inclusive) and IsBetweenExclusive for any IComparable<T>.
  • CSharpEssentials.Time: NextDayOfWeek/PreviousDayOfWeek for DateTime and DateOnly, and GetAge(DateOnly, DateOnly)/GetAge(DateOnly, IDateTimeProvider).
  • CSharpEssentials.Json: JsonElement.ToClrObject() converts a JsonElement to dictionaries, lists and CLR primitives.
  • A Native AOT example for Endpoints and DependencyInjection, published in CI.

Known issues

  • The net11.0 assets are built with the .NET 11 RC1 SDK. A patch release rebuilt with the .NET 11 GA SDK follows the GA release.