Description
We have an existing ASP.NET (not Core) app which is using Unity container for DI. However we would like to add some new Microsoft services such as health checks which require an IServiceCollection
to configure.
It would be very helpful if I could create a ServiceCollection
, add the new Microsoft services, and then populate an existing Unity container with those services. (This seems to be the same request as #23 and/or #24 which were closed by the submitter w/o comment).
It looks like IUnityContainer AddServices(this IUnityContainer container, IServiceCollection services)
in Configuration.cs
does exactly this, but it's currently internal
. Is there any reason to not make it public
?
I can currently create a ServiceProviderFactory
then call CreateBuilder
but that does not allow me to re-use the Unity container I already have.