Skip to content

Announcement: Removing PubTernal Localization APIs #22291

@ryanbrandenburg

Description

@ryanbrandenburg

This is a discussion issue for aspnet/Announcements#417.

Summary

In order to better maintain the public API surface of ASP.NET Core we're removing some "PubTernal" (having the type be public, but in a namespace that implies an internal intent) APIs from Localization.

Version introduced

5.0.0-preview6

Old behavior

  • Microsoft.Extensions.Localization.Internal.AssemblyWrapper is public
  • Microsoft.Extensions.Localization.Internal.IResourceStringProvider is public
  • Microsoft.Extensions.Localization.ResourceManagerStringLocalizer.ctor with AssemblyWrapper is public
  • Microsoft.Extensions.Localization.ResourceManagerStringLocalizer.ctor with IResourceStringProvider is public

New behavior

  • Microsoft.Extensions.Localization.Internal.AssemblyWrapper became Microsoft.Extensions.Localization.AssemblyWrapper and is now internal
  • Microsoft.Extensions.Localization.Internal.IResourceStringProvider became Microsoft.Extensions.Localization.Internal.IResourceStringProvider and is now internal
  • Microsoft.Extensions.Localization.ResourceManagerStringLocalizer.ctor with AssemblyWrapper parameter is now internal
  • Microsoft.Extensions.Localization.ResourceManagerStringLocalizer.ctor with IResourceStringProvider parameter is now internal

Reason for change

Explained more thoroughly here the decision was made to do away with "PubTernal" types. These changes are simply bringing more classes in line with that decision.

Recommended action

Applications which intentionally or accidentally took a dependency on these types should migrate away from them. Since the classes in question existed only as an extension point for our internal testing we believe that's an unlikely scenario, but if you try to do so and believe you have located a scenario which our public API allowed before this change but does not now please file an issue at https://github.com/dotnet/aspnetcore/issues

Category

ASP.NET

Affected APIs

  • Microsoft.Extensions.Localization.Internal.AssemblyWrapper
  • Microsoft.Extensions.Localization.Internal.IResourceStringProvider
  • Microsoft.Extensions.Localization.ResourceManagerStringLocalizer.ctor

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking-changeThis issue / pr will introduce a breaking change, when resolved / merged.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions