DotMake.CommandLine v1.8.1
-
Added support for other dependency injection containers (e.g. Autofac) when
onlyMicrosoft.Extensions.DependencyInjection.Abstractions
package (version >= 2.1.1) is added to the project.
You can set your custom service provider with the extension methodCli.Ext.SetServiceProvider
.
In previous version, this method already existed but accepted aServiceProvider
parameter, instead of
IServiceProvider
parameter which allows 3rd party implementations other than the default one inMicrosoft.Extensions.DependencyInjection
.using DotMake.CommandLine; using Autofac.Core; using Autofac.Core.Registration; var cb = new ContainerBuilder(); cb.RegisterType<object>(); var container = cb.Build(); Cli.Ext.SetServiceProvider(container); Cli.Run<RootCliCommand>();
-
Reduced minimum version requirement for
Microsoft.Extensions.DependencyInjection
from6.0.0
to2.1.1
so that you don't need to update it in legacy projects. AddedCli.Ext.GetServiceCollection
and
Cli.Ext.GetServiceProviderOrDefault
extension methods.