dotnet / dotnet/command-line-api

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

オープン
#1,455 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Area-Hosting and DI
主要言語
C#
スター
3.7k
フォーク
428
PR マージ指標
30日以内にマージされた PR はありません

説明

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 dotnetsuggest`) 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) ?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

この issue では ServiceCollection と command-line-api の .UseHost エントリポイントについて言及されていますが、ファイルやテストは指定されていません。まず既存の .UseHost サポートと使用例を確認し、次に ServiceCollection の直接的な依存性注入がサポートされているか、またどのようなドキュメントが必要かを明らかにしてください。明確な例を提供するか、統合に関する質問に回答できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
cli, documentation
issue の種類
ドキュメント
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。