Template
✨ Updates API, C#, Docker, MSBuild, and Testing guidelines
Refines conventions for ASP.NET API endpoints, C# documentation, Docker build arguments, MSBuild package management, and testing method naming and structure. These changes aim to enhance clarity and enforce best practices across the codebase.
This commit is contained in:
5 files changed
+21
-9
No files matched your search
@@ -8,11 +8,10 @@ Code style is enforced by `.editorconfig`, `.globalconfig`, and StyleCop analyze
|
||||
|
||||
## Non-Obvious Defaults
|
||||
|
||||
- XML doc comments required on public API in `src/` (suppressed in `tests/` and `samples/`).
|
||||
- XML doc comments required on all `public` and `protected` members in `src/` (suppressed in `tests/` and `samples/`).
|
||||
- Avoid `null!` (null-forgiving operator) — fix the nullability flow instead of suppressing the warning.
|
||||
|
||||
## Patterns
|
||||
|
||||
- Prefer **records** for DTOs, value objects, and other immutable data carriers.
|
||||
- Use `LoggerMessage`-generated `partial` methods on a `partial class` — never log inline (e.g., `logger.LogInformation(…)`).
|
||||
|
||||
- Use `LoggerMessage`-generated `partial` methods on a `partial class` — never log inline (e.g., `logger.LogInformation(…)`). If the containing type cannot be made `partial`, convert it to a `partial class` before adding logger methods. Do not fall back to inline logging.
|
||||
Reference in new issue
Block a user