AyCode.Core/AyCode.Models.Server
Loretta affa85e5c5 [LOADED_DOCS: 4 files, no new loads]
Refactor docs: topic folders, TOON, XCUT, protocol sync

- Migrated all topic documentation into dedicated folders with canonical `README.md`, `ISSUES.md`, and `TODO.md` per topic (e.g., `LOGGING/`, `SIGNALR/`, `BINARY/`, `TOON/`).
- Added comprehensive TOON serializer documentation: design, format, options, attributes, inference, issues, and TODOs.
- Introduced `XCUT` folder for cross-cutting issues and TODOs, with canonical entries and topic cross-references.
- Updated all references and navigation to use new folder-based doc paths; fixed links and clarified doc structure.
- Enhanced AI agent protocol: enforce session skill preloading, `[LOADED_DOCS: ...]` short-name prefix, and mandatory `docs-check` skill for doc/code sync.
- Updated `.csproj` to include all `README.md` files for IDE visibility.
- Improved and clarified SignalR, grid, and project-level documentation.
- Minor code/test tweaks and doc content corrections for consistency.
2026-04-24 21:54:04 +02:00
..
DynamicMethods [LOADED_DOCS: 4 files, no new loads] 2026-04-24 21:54:04 +02:00
Logins Document AcBinary wire format, sync docs, update conventions 2026-03-29 09:11:57 +02:00
AyCode.Models.Server.csproj [LOADED_DOCS: 4 files, no new loads] 2026-04-24 21:54:04 +02:00
README.md Add structured metadata blocks to all project/repo docs 2026-03-30 08:53:56 +02:00

README.md

AyCode.Models.Server

@project { type = "framework" }

Server-side models: authentication state and dynamic method dispatch for SignalR message routing.

Folder Structure

Folder Purpose
Logins/ Server-side logged-in user model
DynamicMethods/ Reflection-based method registry for SignalR message tag routing

Key Files

Logins/

  • AcLoggedInModelServer.cs — Implements IAcLoggedInModelBase<...>. Tracks LoggedInUser, AccessToken, LoginErrorCode. Methods: AddLoggedInUser(), Logout().

DynamicMethods/

  • AcMethodInfoModel.cs — Wraps a MethodInfo + its TagAttribute + ParameterInfo[]. Generic over TAttribute : TagAttribute.
  • AcDynamicMethodCallModel.cs — Binds an object instance to its attributed methods. Static ConcurrentDictionary + FrozenDictionary cache — reflection runs once per type. Lookup by MessageTag (int).
  • AcDynamicMethodRegistry.cs — Per-request registry for dynamic method dispatch. Register() stores instances, GetMethodByMessageTag() resolves method + instance with lazy search and static cache. Optimized for small instance counts (array-backed, no List).

Dependencies

Dependency Purpose
AyCode.Core Error codes
AyCode.Core.Server Server-side core
AyCode.Entities Entity base classes
AyCode.Entities.Server Server entities
AyCode.Interfaces Interface contracts
AyCode.Interfaces.Server IAcLoggedInModelBase
AyCode.Models Shared models
AyCode.Services TagAttribute for SignalR method tagging