dotnet / dotnet/command-line-api

Question: Usage models with Service Collection (not using Generic Host)

Open
#1,455 9 comments 0 reactions 0 assignees View on GitHub
Area-Hosting and DI
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

I have been using a different cli library, that has some great features, and is very usable, but lacks functionality such as tab completion (per `dotnet`suggest`) However it does work well with using a raw ServiceCollection and provides the ability to inject those services into commands.

Im assessing the lift to migrate.

I see that `command-line-api` has Host Builder support (via `.UseHost` by scanning issues - open and closed) bit not specific documentation.

Are there any examples out there of just using the ServiceCollection with DI support (the other library uses reflection)?

One hopes in-time that (as other libraries) the DI integration is not tightly integrated such that one can use different services containers (albeit in the other library once would need to write a custom `Convention` vs the included DI one to achieve this) ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.