[FEATURE] Add custom IoC Container support with HostBuilder.UseServiceProviderFactory
method
#170
Labels
DI
gitauto
GitAuto label to trigger the app in a issue.
good first issue
Good for newcomers
hacktoberfest
Participation in the Hacktoberfest event
help wanted
Extra attention is needed
IoC
.NET
Pull requests that update .net code
question
Further information is requested
🛠 WIP
Work in progress
Description
We must enhance our service registry to support the
.NET
methodHostBuilder.UseServiceProviderFactory
. This will involve creating our own IoC (Inversion of Control) container, following the standards and rules observed in popular libraries like Autofac, Castle Windsor, NInject, and SimpleInjector, but without introducing dependencies on these external libraries.Problem Statement
UseServiceProviderFactory
method, and we do not have a custom IoC container that follows established patterns and practices. This limits our flexibility in managing dependencies and configuring services.UseServiceProviderFactory
, we cannot fully leverage the benefits of advanced dependency management techniques and integrations.Proposed Solution
.NET
using theHostBuilder.UseServiceProviderFactory
method, providing a flexible and extensible solution for dependency management.Implementation Steps
Design Custom IoC Container:
Implement
UseServiceProviderFactory
:Implement a service provider factory that uses the custom IoC container:
Update the
Program.cs
orStartup.cs
file to use the custom service provider factory:Configure Dependency Registration:
Test Integration:
UseServiceProviderFactory
integration work as expected. Test service registration, resolution, and lifecycle management.Documentation:
HostBuilder.UseServiceProviderFactory
.Additional Notes
The text was updated successfully, but these errors were encountered: