-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Add validation to Router component to prevent both NotFound and NotFoundPage being set #62625
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
base: main
Are you sure you want to change the base?
Conversation
…neously Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
Router.NotFoundPage
Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
…dation Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
@copilot, add one unit test to |
Co-authored-by: ilonatommy <32700855+ilonatommy@users.noreply.github.com>
Added unit test |
In this PR:
Router.NotFoundPage
public Type NotFoundPage { get; set; }
->public Type? NotFoundPage { get; set; }
NotFound
render fragment inRouter
as deprecated.NotFound
andNotFoundPage
are defined, log a warning. Do it inRouter.SetParametersAsync
in if (NotFoundPage != null) condition. Use the logger that is available there, add a new method to private static partial class Log with warning level. In the warning message, underline that we preferNotFoundPage
to be used and thatNotFound
will be deprecated. We are disabling treating warnings as errors, so they have to be disabled in some places to fix the build.Fixes: #62409