Robertscorp / Slender.Dependencies

A .NET library to register your project's dependencies without being tied to a specific dependency injection container.
MIT License
0 stars 0 forks source link

Investigate an Interface that is implemented to register a Dependency with a DependencyInjection container #33

Closed Robertscorp closed 9 months ago

Robertscorp commented 1 year ago

This should be designed in a way to allow custom Lifetimes and a change in the design of Dependency to only allow a single "Implementation" (also an interface that can be used to add the implementation to the DI Container registration interface)

Robertscorp commented 10 months ago

This is now a sub-point of #34, as the implementation of that will handle this requirement

Robertscorp commented 9 months ago

This can be solved by an implementation of IDependencyCollection that is an interface adapter to the dependency injection container.

For example, a ServiceCollectionDependencyCollection can take in a ServiceCollection as a constructor parameter (dependency), and then implement the AddDependency method as adding to the ServiceCollection.