Open samtrion opened 4 years ago
Have you looked at System.CommandLine.Hosting? It provides integration with Microsoft.Extensions.Logging, Microsoft.Extensions.DependencyInjection, etc.
Yeah, I already looked at that. However, my current use case is based on an IWebHostBuilder
, which makes System.CommandLine.Hosting
out of the question for me.
System.CommandLine.Hosting
doesn't seem to exist anymore in the latest beta 4.
I was looking at how to inject ILogger<MyType>
into the handler.
@JobaDiniz, https://www.nuget.org/packages/System.CommandLine.Hosting/0.4.0-alpha.22272.1 was built from the same commit 209b724a3c843253d3071e8348c353b297b0b8b5 as https://www.nuget.org/packages/System.CommandLine/2.0.0-beta4.22272.1.
@JobaDiniz, https://www.nuget.org/packages/System.CommandLine.Hosting/0.4.0-alpha.22272.1 was built from the same commit 209b724 as https://www.nuget.org/packages/System.CommandLine/2.0.0-beta4.22272.1.
Oh, it's a different nuget package. I wasn't aware of that. Thanks.
In the interest of standardization, it would be an enormous advantage if
System.CommandLine
could offer aMicrosoft.Extensions.Logging
extension.If interested, I can contribute a simple implementation.