-
-
Notifications
You must be signed in to change notification settings - Fork 362
doc(Router): compatible with NET10 #7054
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
Conversation
Reviewer's GuideIntroduce a conditional compilation check in the Routes.razor component to toggle the NotFoundPage parameter when targeting .NET 10 or greater. Class diagram for updated Routes.razor component logicclassDiagram
class Routes {
+bool IsNet10OrGreater
}
Routes : @code block
Routes : conditional rendering based on IsNet10OrGreater
Flow diagram for conditional Router rendering in Routes.razorflowchart TD
A["IsNet10OrGreater == true?"] -->|Yes| B["Render Router with NotFoundPage parameter"]
A -->|No| C["Render Router without NotFoundPage parameter"]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds conditional rendering to support the NotFoundPage parameter of the Router component, which is only available in .NET 10 or greater. The code uses preprocessor directives and runtime checks to ensure compatibility with earlier .NET versions.
Key Changes:
- Added conditional logic to render different Router configurations based on .NET version
- Introduced
IsNet10OrGreaterproperty using preprocessor directives to detect .NET 10+ - Router with
NotFoundPageparameter is used for .NET 10+, while the basic Router (without this parameter) is used for earlier versions
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7054 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 745 745
Lines 32532 32532
Branches 4510 4510
=========================================
Hits 32532 32532
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #7053
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add conditional compilation in Routes.razor to support .NET 10 compatibility by toggling the NotFoundPage parameter on the Router component.
Bug Fixes:
Enhancements: