Skip to content

Commit cb7d937

Browse files
authored
Add C# development instruction in Japanese (#228)
* Add C# instruction in Japanese * change title * update README
1 parent 6434198 commit cb7d937

File tree

2 files changed

+115
-0
lines changed

2 files changed

+115
-0
lines changed

README.instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Team and project-specific instructions to enhance GitHub Copilot's behavior for
3030
| [Conventional Commit](instructions/conventional-commit.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fconventional-commit.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fconventional-commit.prompt.md) | Prompt and workflow for generating conventional commit messages using a structured XML format. Guides users to create standardized, descriptive commit messages in line with the Conventional Commits specification, including instructions, examples, and validation. |
3131
| [Convert Spring JPA project to Spring Data Cosmos](instructions/convert-jpa-to-spring-data-cosmos.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fconvert-jpa-to-spring-data-cosmos.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fconvert-jpa-to-spring-data-cosmos.instructions.md) | Step-by-step guide for converting Spring Boot JPA applications to use Azure Cosmos DB with Spring Data Cosmos |
3232
| [Copilot Process tracking Instructions](instructions/copilot-thought-logging.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcopilot-thought-logging.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcopilot-thought-logging.instructions.md) | See process Copilot is following where you can edit this to reshape the interaction or save when follow up may be needed |
33+
| [C# アプリケーション開発](instructions/csharp-ja.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcsharp-ja.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcsharp-ja.instructions.md) | C# アプリケーション構築指針 by @tsubakimoto |
3334
| [C# 코드 작성 규칙](instructions/csharp-ko.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcsharp-ko.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcsharp-ko.instructions.md) | C# 애플리케이션 개발을 위한 코드 작성 규칙 by @jgkim999 |
3435
| [C# Development](instructions/csharp.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcsharp.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fcsharp.instructions.md) | Guidelines for building C# applications |
3536
| [Dart and Flutter](instructions/dart-n-flutter.instructions.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fdart-n-flutter.instructions.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/instructions?url=vscode-insiders%3Achat-instructions%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Finstructions%2Fdart-n-flutter.instructions.md) | Instructions for writing Dart and Flutter code following the official recommendations. |
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
description: 'C# アプリケーション構築指針 by @tsubakimoto'
3+
applyTo: '**/*.cs'
4+
---
5+
6+
# C# アプリケーション開発
7+
8+
## C# の指針
9+
- 常に最新の C# を使用します。現在は C# 13 の機能です。
10+
- 各関数に対して明確で簡潔なコメントを書きます。
11+
12+
## 全般ガイドライン
13+
- コード変更のレビューでは、確信度の高い提案のみを行います。
14+
- なぜその設計判断をしたのかという理由を含むコメントなど、保守性の高い実践に沿ってコードを書きます。
15+
- エッジケースに対応し、明確な例外処理を書きます。
16+
- ライブラリや外部依存については、用途と目的をコメントで明記します。
17+
18+
## 命名規則
19+
20+
- コンポーネント名、メソッド名、公開メンバーには PascalCase を使用します。
21+
- プライベートフィールドとローカル変数には camelCase を使用します。
22+
- インターフェイス名は "I" を接頭辞にします(例: IUserService)。
23+
24+
## フォーマット
25+
26+
- `.editorconfig` で定義されたコードフォーマットスタイルを適用します。
27+
- ファイルスコープの namespace 宣言と 1 行の using ディレクティブを推奨します。
28+
- 任意のコード ブロック(if、for、while、foreach、using、try など)の開始波括弧の前に改行を入れます。
29+
- メソッドの最終 return 文は独立した行に配置します。
30+
- 可能な限りパターンマッチングと switch 式を使用します。
31+
- メンバー名参照には文字列リテラルではなく `nameof` を使用します。
32+
- すべての公開 API に XML ドキュメントコメントを作成します。可能であれば `<example>``<code>` も含めます。
33+
34+
## プロジェクトのセットアップと構成
35+
36+
- 適切なテンプレートで新規 .NET プロジェクトを作成する手順を案内します。
37+
- 生成される各ファイルとフォルダーの目的を説明し、プロジェクト構造の理解を助けます。
38+
- フィーチャーフォルダーやドメイン駆動設計(DDD)による整理方法を示します。
39+
- モデル、サービス、データ アクセス層による責務分離を示します。
40+
- ASP.NET Core 9 における Program.cs と構成システム、そして環境別設定を説明します。
41+
42+
## Nullable 参照型
43+
44+
- 変数は非 null で宣言し、エントリポイントで `null` を検査します。
45+
- `== null``!= null` ではなく、常に `is null` または `is not null` を使用します。
46+
- C# の null 注釈を信頼し、型システムが値の非 null を保証している場合は不要な null チェックを追加しません。
47+
48+
## データ アクセス パターン
49+
50+
- Entity Framework Core を用いたデータアクセス層の実装を案内します。
51+
- 開発および本番における選択肢(SQL Server、SQLite、In-Memory)を説明します。
52+
- リポジトリパターンの実装と、それが有効となる場面を示します。
53+
- データベースマイグレーションとデータシーディングの実装方法を示します。
54+
- 一般的なパフォーマンス問題を避ける効率的なクエリパターンを説明します。
55+
56+
## 認証と認可
57+
58+
- JWT ベアラートークンを用いた認証の実装を案内します。
59+
- ASP.NET Core に関連する OAuth 2.0 および OpenID Connect の概念を説明します。
60+
- ロールベースおよびポリシーベースの認可の実装方法を示します。
61+
- Microsoft Entra ID(旧 Azure AD)との統合を示します。
62+
- コントローラーベース API と Minimal API の双方を一貫して保護する方法を説明します。
63+
64+
## 検証とエラー処理
65+
66+
- データ注釈と FluentValidation を用いたモデル検証の実装を案内します。
67+
- 検証パイプラインと、検証応答のカスタマイズ方法を説明します。
68+
- ミドルウェアを用いたグローバル例外処理戦略を示します。
69+
- API 全体で一貫したエラー応答を作成する方法を示します。
70+
- 標準化されたエラー応答のための Problem Details(RFC 7807)の実装を説明します。
71+
72+
## API のバージョニングとドキュメント
73+
74+
- API バージョニング戦略の実装とその解説を案内します。
75+
- 適切なドキュメントを伴う Swagger / OpenAPI の実装を示します。
76+
- エンドポイント、パラメーター、応答、認証の文書化方法を示します。
77+
- コントローラーベース API と Minimal API の双方でのバージョニングを説明します。
78+
- 利用者に役立つ有意義な API ドキュメントの作成を案内します。
79+
80+
## ロギングと監視
81+
82+
- Serilog などを用いた構造化ロギングの実装を案内します。
83+
- ログレベルと、それぞれを使用すべき場面を説明します。
84+
- テレメトリ収集のための Application Insights との統合を示します。
85+
- リクエスト追跡のためのカスタムテレメトリと相関 ID の実装方法を示します。
86+
- API のパフォーマンス、エラー、利用パターンの監視方法を説明します。
87+
88+
## テスト
89+
90+
- アプリケーションの重要な経路には必ずテストケースを含めます。
91+
- 単体テストの作成を案内します。
92+
- "Act"、"Arrange"、"Assert" のコメントは記述しません。
93+
- 近傍ファイルの既存スタイル(テストメソッド名や大文字/小文字)に合わせます。
94+
- API エンドポイントの統合テスト手法を説明します。
95+
- 効率的なテストのために依存関係をモックする方法を示します。
96+
- 認証および認可ロジックのテスト方法を示します。
97+
- API 開発に適用するテスト駆動開発(TDD)の原則を説明します。
98+
99+
## パフォーマンス最適化
100+
101+
- キャッシュ戦略(インメモリ、分散、レスポンスキャッシュ)の実装を案内します。
102+
- 非同期プログラミングパターンと、それが API のパフォーマンスにおいて重要である理由を説明します。
103+
- 大規模データセット向けのページング、フィルタリング、ソートを示します。
104+
- 圧縮などのパフォーマンス最適化の実装方法を示します。
105+
- API パフォーマンスの測定とベンチマーク方法を説明します。
106+
107+
## デプロイと DevOps
108+
109+
- .NET の組み込みコンテナーサポート(`dotnet publish --os linux --arch x64 -p:PublishProfile=DefaultContainer`)を用いた API のコンテナー化を案内します。
110+
- 手動で Dockerfile を作成する方法と、.NET のコンテナー公開機能の違いを説明します。
111+
- .NET アプリケーション向け CI/CD パイプラインを説明します。
112+
- Azure App Service、Azure Container Apps、その他のホスティングオプションへのデプロイを示します。
113+
- ヘルスチェックと Readiness Probe の実装方法を示します。
114+
- 各デプロイ段階における環境固有の構成を説明します。

0 commit comments

Comments
 (0)