AyCode.Core/AyCode.Models.Server
Loretta 03d606164c Overhaul SignalR/DataSource docs, update all references
- Added SIGNALR.md (transport) and SIGNALR_DATASOURCE.md (collection) as layered, comprehensive documentation; retired SIGNALR_ARCHITECTURE.md
- Updated all .md files and READMEs to reference new docs and clarify separation between transport and DataSource
- Clarified CRUD tag structure (5 independent tags), single-method tag-based dispatch, and JSON-in-Binary tech debt
- Added slot allocation and wire format clarifications to serialization docs
- Improved documentation layering, conventions, and critical warnings for future maintainers
2026-03-29 18:28:52 +02:00
..
DynamicMethods Overhaul SignalR/DataSource docs, update all references 2026-03-29 18:28:52 +02:00
Logins Document AcBinary wire format, sync docs, update conventions 2026-03-29 09:11:57 +02:00
AyCode.Models.Server.csproj Add .targets file 2025-08-31 13:07:34 +02:00
README.md Document AcBinary wire format, sync docs, update conventions 2026-03-29 09:11:57 +02:00

README.md

AyCode.Models.Server

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