Skip to content

Conversation

@ofir-frd
Copy link

Benchmark PR dotnet#62755

Type: Clean (correct implementation)

Original PR Title: [Blazor] Remove obsolete APIs from Components
Original PR Description: This PR removes obsolete APIs from the Blazor Components library that were marked as obsolete, as per the project's obsolete API removal policy.

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Description

Components (Microsoft.AspNetCore.Components)

  • Removed the PreferExactMatches property from Router which was marked obsolete and had no effect on routing behavior
  • Removed obsolete ResourceAsset constructor overload

Forms (Microsoft.AspNetCore.Components.Forms)

  • Removed the AddDataAnnotationsValidation method (replaced by EnableDataAnnotationsValidation)
  • Removed the obsolete EnableDataAnnotationsValidation(EditContext) overload without IServiceProvider parameter

Web (Microsoft.AspNetCore.Components.Web)

  • Removed the obsolete RemoteBrowserFileStreamOptions class
  • Removed the obsolete WebEventCallbackFactoryEventArgsExtensions class and all its methods
  • Removed the obsolete RendererId.init accessor from WebRenderer

WebAssembly (Microsoft.AspNetCore.Components.WebAssembly)

  • Removed obsolete NotifyLocationChanged(string, bool) method from JSInteropMethods

WebAssembly.Authentication (Microsoft.AspNetCore.Components.WebAssembly.Authentication)

  • Removed the obsolete SignOutSessionStateManager class and all references
  • Removed obsolete RemoteAuthenticationService constructor without logger parameter
  • Removed obsolete AccessTokenResult constructor and RedirectUrl property
  • Updated AccessTokenNotAvailableException to use InteractiveRequestUrl instead of removed RedirectUrl
  • Updated RemoteAuthenticatorViewCore sign-out validation logic to properly handle null HistoryEntryState (only fail validation when state exists but is invalid)

API Surface

  • All PublicAPI.Shipped.txt files remain unchanged per API baseline policy
  • Added *REMOVED* entries to corresponding PublicAPI.Unshipped.txt files for all removed APIs

Tests

  • Removed tests that were using obsolete APIs (SignOutSessionStateManager, AddDataAnnotationsValidation)

Validation

  • ✅ All builds pass successfully
  • ✅ All existing tests continue to pass
  • ✅ No breaking changes to non-obsolete functionality
  • ✅ Code follows project formatting standards
  • ✅ API baseline policy followed correctly

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Original PR URL: dotnet#62755

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants