docs: add .NET coding standards and reference from phase docs
Establish project-wide rules for testing (xUnit 3 / Shouldly / NSubstitute), logging (Microsoft.Extensions.Logging + Serilog + LogContext), and general C# conventions. Referenced from CLAUDE.md and phases 4-7.
This commit is contained in:
@@ -50,9 +50,14 @@ dotnet run --project tools/NatsNet.PortTracker -- <command> --db porting.db
|
||||
- **Phase 6: Initial Porting** - `docs/plans/phases/phase-6-porting.md`
|
||||
- **Phase 7: Porting Verification** - `docs/plans/phases/phase-7-porting-verification.md`
|
||||
|
||||
## Naming Conventions
|
||||
## .NET Standards
|
||||
|
||||
.NET projects use the `ZB.MOM.NatsNet.Server` prefix. Namespaces follow the `ZB.MOM.NatsNet.Server.[Module]` pattern.
|
||||
All .NET code must follow the rules in [`docs/standards/dotnet-standards.md`](docs/standards/dotnet-standards.md). Key points:
|
||||
|
||||
- .NET 10, C# latest
|
||||
- **Testing**: xUnit 3, Shouldly, NSubstitute — do NOT use FluentAssertions or Moq
|
||||
- **Logging**: `Microsoft.Extensions.Logging` with Serilog provider; use `LogContext.PushProperty` for contextual enrichment
|
||||
- **Naming**: PascalCase for all public members; `ZB.MOM.NatsNet.Server.[Module]` namespace hierarchy
|
||||
|
||||
## Reports
|
||||
|
||||
|
||||
Reference in New Issue
Block a user