Announcements icon indicating copy to clipboard operation
Announcements copied to clipboard

[Breaking change]: Minimal API renames in RC1

Open halter73 opened this issue 2 years ago • 0 comments

Description

In RC1, the following APIs were renamed.

  • The Microsoft.AspNetCore.Builder.MinimalActionEndpointConventionBuilder class was renamed to Microsoft.AspNetCore.Builder.DelegateEndpointConventionBuilder.
    • Note: This was renamed again in RC2 to Microsoft.AspNetCore.Builder.RouteHandlerBuilder. See https://github.com/aspnet/Announcements/issues/475.
  • The Microsoft.AspNetCore.Builder.MinimalActionEndpointRouteBuilderExtensions class was renamed to Microsoft.AspNetCore.Builder.DelegateEndpointRouteBuilderExtensions.
    • Note: This was merged with Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions in RC2. See https://github.com/aspnet/Announcements/issues/475.
  • The Delegate parameter to Map, MapGet, MapPost, MapPut, MapDelete, MapMethod, MapFallback and RequestDelegateFactory.Create was renamed from action to handler.

These changes were made in https://github.com/dotnet/aspnetcore/pull/35570.

Version

.NET 6 RC1

Previous behavior

There is no behavioral change. These are just renames.

New behavior

There is no behavioral change. These are just renames.

Type of breaking change

  • [X] Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load/execute or different run-time behavior.
  • [X] Source incompatible: Source code may encounter a breaking change in behavior when targeting the new runtime/component/SDK, such as compile errors or different run-time behavior.

Reason for change

This change was made to improve the consistency of type names and remove "minimal" and "action" from the APIs.

Recommended action

It is recommended you recompile any projects built with an earlier SDK. For most projects, this should be all that is necessary.

If any of these type names or parameter names were referenced directly by name, the source should be updated to reflect the new names.

Affected APIs

  • Microsoft.AspNetCore.Builder.MinimalActionEndpointConventionBuilder
  • Microsoft.AspNetCore.Builder.MinimalActionEndpointRouteBuilderExtensions
    • This includes all the methods on this class having their Delegate parameter renamed from action to handler.
  • Microsoft.AspNetCore.Http.RequestDelegateFactory.Create(Delegate action, RequestDelegateFactoryOptions? options = null)

Discussion issue: https://github.com/dotnet/aspnetcore/issues/37671

halter73 avatar Oct 19 '21 02:10 halter73