AyCode.Core/AyCode.Core/Consts
Loretta 17daf0fef2 Document AcBinary wire format, sync docs, update conventions
- Add BINARY_FORMAT.md: full AcBinary wire format spec (markers, encoding, options, protocol, interactions)
- Reference BINARY_FORMAT.md from GLOSSARY.md, Binaries/README.md, and Serializers/Binaries/README.md; add new glossary terms
- Clarify and expand config options tables to match new doc
- Add/clarify LLM maintenance rules: always sync .md files with code, auto-fix discrepancies
- Update root README.md: AyCode.Core targets .NET 9, not 10; stress doc/code sync
- Add code reuse and doc sync conventions to copilot-instructions.md and CONVENTIONS.md
- Add docs/ folder and BINARY_FORMAT.md to solution as Solution Items
- Minor clarifications and cross-links in ARCHITECTURE.md and other docs
2026-03-29 09:11:57 +02:00
..
AcConst.cs Add Logger 2024-05-14 13:04:01 +02:00
AcEnv.cs Add Logger 2024-05-14 13:04:01 +02:00
AcErrorCode.cs improvements, fixes, etc... 2024-08-12 13:21:34 +02:00
AcRegExpression.cs F*ck Regex 2024-07-08 19:20:15 +02:00
AcValidate.cs
README.md Document AcBinary wire format, sync docs, update conventions 2026-03-29 09:11:57 +02:00

README.md

Consts

Project-wide constants, error codes, environment configuration, regex patterns, and input validation.

Key Files

  • AcConst.cs — Central constants: ProjectId/ProjectSalt (loaded from appsettings), user/password length limits, TCP/messaging defaults, well-known Guids, AvailableDomainSuffixes (300+ TLDs). Critical: GenerateProjectSalt() must not be modified — it is tied to authentication.
  • AcEnv.cs — Environment access: AppConfiguration (lazy-loaded from appsettings.json + env vars), NL (newline), MaxLogItemsPerSession, GetEnum<T>() config helper.
  • AcErrorCode.cs — Byte enum with 60+ error codes (0=UnknownError ... 255=Unset). Used across the entire API layer.
  • AcRegExpression.cs — Compile-time generated regex via [GeneratedRegex]: EmailRegex() (RFC-compliant), PhoneNumberRegex() (E.164 format).
  • AcValidate.cs — Input validation methods returning bool + out AcErrorCode: email, password, username, player name, phone, domain, user token format checks.