-
-
Notifications
You must be signed in to change notification settings - Fork 4
Support basic refactoring from static
to sealed
#234
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
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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 implements a basic refactoring feature that converts static handler classes to sealed instance handlers, supporting issue #227. The refactoring automatically transforms static handlers with dependency injection parameters into sealed classes with primary constructors.
- Adds code refactoring capability to convert
static
handler classes tosealed
instance handlers - Implements automated parameter transformation from method dependencies to class constructor parameters
- Includes comprehensive test coverage for various refactoring scenarios
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tests/Immediate.Handlers.Tests/Immediate.Handlers.Tests.csproj |
Adds CodeRefactoring.Testing package reference for test infrastructure |
tests/Immediate.Handlers.Tests/CodeFixTests/StaticToSealedHandlerRefactoringProviderTests.cs |
Comprehensive test suite covering refactoring scenarios including class/method triggers and dependency handling |
tests/Immediate.Handlers.Tests/CodeFixTests/HandlerMethodMustExistCodeFixProviderTests.cs |
Renames test class for clarity and consistency |
tests/Immediate.Handlers.Tests/CodeFixTests/CodeRefactoringTestHelper.cs |
Test helper utility for code refactoring test infrastructure |
src/Immediate.Handlers.CodeFixes/StaticToSealedHandlerRefactoringProvider.cs |
Main refactoring provider implementing static-to-sealed transformation logic |
src/Immediate.Handlers.CodeFixes/RefactoringExtensions.cs |
Extension methods for refactoring context and document operations |
src/Common/SyntaxExtensions.cs |
Utility method for CancellationToken type detection |
src/Common/ITypeSymbolExtensions.cs |
Makes IsCancellationToken method nullable-aware |
Directory.Packages.props |
Adds CodeRefactoring.Testing package version specification |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Fixes #227