-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: main
Are you sure you want to change the base?
GitAuto: [FEATURE] Add custom IoC Container support with HostBuilder.UseServiceProviderFactory
method
#577
Conversation
Infisical secrets check: ✅ No secrets leaked! 💻 Scan logs12:10AM INF scanning for exposed secrets...
12:10AM INF 564 commits scanned.
12:10AM INF scan completed in 688ms
12:10AM INF no leaks found
|
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]) |
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