Conventions
The code conventions of the library and its project files.
Code
- C# 14 preview features (e.g.,
extensionsyntax) are used where they reduce noise. - Nullable reference types are enabled — respect the annotations.
- Generic type parameters use single uppercase letters:
Vfor value types,Ifor identifier types,Afor attribute types. Iprefix for interfaces, PascalCase for classes,_camelCasefor private fields,UPPER_SNAKE_CASEfor constants.sealedon classes that aren't designed for inheritance (e.g.,Variant).
Project file conventions
Each project follows these conventions:
- <TargetFramework>net11.0</TargetFramework>
- <Nullable>enable</Nullable>
- <ImplicitUsings>enable</ImplicitUsings>
- <LangVersion>preview</LangVersion> (C# 14 preview features)
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors> (CI enforces clean builds)
- Line width 80 characters, Allman braces, 4-space indent
- File-scoped namespaces preferred
Package versions are managed centrally in Directory.Packages.props. No <Version> elements in .csproj files.