Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Use dependency injection in more places

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

@deansheather がすでに取り組んでいます。

2025年5月8日 から。

評価

この issue はまだ評価されていません。

説明

In some places where we need to pass parameters that aren't DI-able, we are using a pattern of DI-ing the fields to the "parent" and then passing them to the new child without using DI.

Ideally we use DI as much as possible and not pass stuff down. We may need to use factories to accomplish this.

E.g.

class MyClass(ISomethingProvider somethingProvider)
{
  public ChildClass CreateChild(string myParam)
  {
    return new ChildClass(somethingProvider, myParam);
  }
}

https://github.com/coder/coder-desktop-windows/blob/a58864eb60643309cce9d0aa67681fff551ff1b8/App/Views/FileSyncListWindow.xaml.cs#L19

Also the yet to be merged remote directory picker contains an instance of this too.

主要言語
C#
スター
29
フォーク
12
平均マージ
4時間 15分
マージ済み PR(30日)
2

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

coder/coder-desktop-windows のほかの issue

coder/coder-desktop-windows の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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