-
-
Notifications
You must be signed in to change notification settings - Fork 374
chore(ErrorLogger): replace concrete ErrorLogger usages with the IErrorLogger #7495
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 guide (collapsed on small PRs)Reviewer's GuideRenames usages of the ErrorLogger component to use the IErrorLogger interface in consumer components and updates the ErrorLogger initialization callback to expose the interface type, aligning field types and callback signatures with the interface without altering behavior. Class diagram for ErrorLogger to IErrorLogger usage updateclassDiagram
direction LR
class IErrorLogger {
<<interface>>
Register(handlerException)
}
class ErrorLogger {
+Func~IErrorLogger, Task~ OnInitializedCallback
}
class TabItemContent {
-IOptionsMonitor~BootstrapBlazorOptions~ Options
-IErrorLogger _logger
-RenderHandle _renderHandle
BuildRenderTree(builder)
}
class Layout {
-IErrorLogger _errorLogger
-Task OnErrorLoggerInitialized(logger)
}
ErrorLogger ..|> IErrorLogger
TabItemContent --> IErrorLogger : uses_field
TabItemContent --> ErrorLogger : uses_static_names
Layout --> IErrorLogger : uses_field
Layout --> IErrorLogger : init_callback_param
ErrorLogger --> IErrorLogger : OnInitializedCallback_type
File-Level Changes
Assessment against 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 refactors the codebase to use the IErrorLogger interface instead of the concrete ErrorLogger class for field declarations and callback signatures, promoting better abstraction and testability.
Changes:
- Updated private field types from
ErrorLogger?toIErrorLogger?in TabItemContent and Layout components - Updated callback function signatures from
Func<ErrorLogger, Task>toFunc<IErrorLogger, Task>in ErrorLogger component and its consumers
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/BootstrapBlazor/Components/Tab/TabItemContent.cs | Changed private logger field and callback parameter types to use IErrorLogger interface |
| src/BootstrapBlazor/Components/Layout/Layout.razor.cs | Changed private logger field and initialization method parameter to use IErrorLogger interface |
| src/BootstrapBlazor/Components/ErrorLogger/ErrorLogger.cs | Changed OnInitializedCallback parameter type to accept IErrorLogger instead of concrete ErrorLogger class |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Link issues
fixes #7494
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Enhancements: