-
Notifications
You must be signed in to change notification settings - Fork 18
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
GitAuto: [FEATURE] Add custom IoC Container support with HostBuilder.UseServiceProviderFactory
method
#577
GitAuto: [FEATURE] Add custom IoC Container support with HostBuilder.UseServiceProviderFactory
method
#577
Conversation
Quality Gate passedIssues Measures |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
❌ Build CrispyWaffle 8.2.198 failed (commit 4c492e73b5 by @gitauto-ai[bot]) |
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Sonarcsharp (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
✅ Build CrispyWaffle 9.1.103 completed (commit db165b52aa by @guibranco) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #577 +/- ##
=======================================
Coverage 40.53% 40.53%
=======================================
Files 83 83
Lines 3631 3631
Branches 519 519
=======================================
Hits 1472 1472
Misses 2057 2057
Partials 102 102 ☔ View full report in Codecov by Sentry. |
✅ Build CrispyWaffle 9.1.143 completed (commit 18e939b835 by @gstraccini[bot]) |
Quality Gate passedIssues Measures |
✅ Build CrispyWaffle 9.1.167 completed (commit 9d682ba13a by @gstraccini[bot]) |
Infisical secrets check: ✅ No secrets leaked! 💻 Scan logs12:00AM INF scanning for exposed secrets...
12:00AM INF 637 commits scanned.
12:00AM INF scan completed in 768ms
12:00AM INF no leaks found
|
Resolves #170
What is the feature
Implement support for a custom Inversion of Control (IoC) container by integrating the
.NET
methodHostBuilder.UseServiceProviderFactory
. This feature introduces a custom service provider factory that allows the application to use a tailor-made IoC container, aligning with standards from established IoC libraries without relying on external dependencies.Why we need the feature
Our current service registry lacks support for
UseServiceProviderFactory
, limiting our flexibility in dependency management and service configuration. By implementing a custom IoC container, we can:How to implement and why
Step 1: Design a Custom IoC Container
Create Core Functionality:
Adhere to Standards:
Step 2: Implement the
UseServiceProviderFactory
MethodCreate the Service Provider Factory:
IServiceProviderFactory<TContainerBuilder>
interface with our custom container builder.Integrate with
HostBuilder
:Step 3: Extend Service Registration Capabilities
Implement Registration Methods:
Support Advanced Features:
Step 4: Test the Integration Thoroughly
Unit Testing:
Integration Testing:
Step 5: Documentation and Examples
Provide Clear Documentation:
Update Existing Documentation:
About backward compatibility
The introduction of the custom IoC container is designed to be fully backward compatible:
IServiceCollection
, ensuring that services behave as before unless overridden.By ensuring backward compatibility, we allow current users to benefit from the new feature without disrupting existing functionality.
Test these changes locally