Skip to content

[Blazor] NavigationManager API consolidation: NotFound method => NotifyNotFound() + NotFoundEvent => NotFound #61015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hakenr opened this issue Mar 19, 2025 · 3 comments
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-blazor Includes: Blazor, Razor Components

Comments

@hakenr
Copy link
Member

hakenr commented Mar 19, 2025

Background and Motivation

I'm not sure how this got through the API review process (I'm not able to find the related discussion with possible justification), but the naming introduced in #60752 seems odd. The Event suffix in NotFoundEvent isn't commonly used in .NET APIs, and I believe it's considered inappropriate naming.

Proposed API

- public event EventHandler<EventArgs> NotFoundEvent
+ public event EventHandler<EventArgs> NotFound

- public virtual void NotFound()
+ public virtual void NotifyNotFound()

Reference

@ilonatommy @javiercn @SteveSandersonMS

(If you need a hand, I will prepare a PR for this.)

@hakenr hakenr added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Mar 19, 2025
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Mar 19, 2025
@javiercn
Copy link
Member

@hakenr thanks for contacting us.

It hasn't gotten through API review yet. When it does, we'll adjust the naming based on whatever decision we make there.

Thanks for bringing this up.

@hakenr
Copy link
Member Author

hakenr commented Mar 19, 2025

@javiercn Thanks for the clarification.
I appreciate you considering my suggestion during the review.

@javiercn javiercn added this to the .NET 10 Planning milestone Mar 19, 2025
@javiercn
Copy link
Member

I'm closing this issue as we are tracking changes #61133 in the API review issue.

I brought up these suggestions although I believe we settled on a slightly different option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

2 participants