AyCode.Core/AyCode.Core
Loretta f051f32bfa Refactor MaxDepth handling: explicit Throw/Truncate/Disable
- Introduce `MaxDepthBehavior` option (`Throw`, `Truncate`, `Disable`) for explicit depth-limit handling in AcBinarySerializer and SGen.
- Default is now `Throw` (fail-fast); `ShallowCopy` preset uses `Truncate` for shallow-copy semantics.
- Refactor runtime and SGen paths to use unified `TryEnterRecursion`/`ExitRecursion` for correct wire output and inc/dec symmetry.
- Add focused tests to diagnose SGen+Truncate wire-misalignment bug (see `BINARY_ISSUES.md#accore-bin-i-t7k3`).
- Update docs and comments to clarify new behavior and document Toon serializer's current lack of `MaxDepthBehavior` support.
- Adjust tests and usages for new semantics and improved safety.
2026-05-14 14:13:48 +02:00
..
Compression Document AcBinary wire format, sync docs, update conventions 2026-03-29 09:11:57 +02:00
Consts Document AcBinary wire format, sync docs, update conventions 2026-03-29 09:11:57 +02:00
Enums Document AcBinary wire format, sync docs, update conventions 2026-03-29 09:11:57 +02:00
Extensions Zero-copy SignalR: direct object response, no SignalData 2026-04-06 22:45:00 +02:00
Helpers Add segment streaming to SignalR binary protocol 2026-04-10 09:27:40 +02:00
Interfaces Document AcBinary wire format, sync docs, update conventions 2026-03-29 09:11:57 +02:00
Loggers [LOADED_DOCS: 4 files, no new loads] 2026-04-24 21:54:04 +02:00
Properties Update defaults, docs, and internals for AcBinary serializer 2026-04-02 22:17:46 +02:00
Serializers Refactor MaxDepth handling: explicit Throw/Truncate/Disable 2026-05-14 14:13:48 +02:00
docs Refactor MaxDepth handling: explicit Throw/Truncate/Disable 2026-05-14 14:13:48 +02:00
AcDomain.cs IAcSoftRemoveEntity 2024-11-13 10:58:39 +01:00
AyCode.Core.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.Core

@project { type = "framework" }

Core library for the AyCode platform. Targets .NET 9 (set in AyCode.Core.targets). Provides serialization (Binary, JSON, Toon), compression, logging, validation, and shared utilities.

Documentation

Document Topic
BINARY_FORMAT.md Binary wire format spec (stream layout, type markers)
BINARY_FEATURES.md Binary features (interning, ref tracking, property ordering)
BINARY_OPTIONS.md Binary configuration options & presets
LOGGING.md Logging framework (hierarchy, config, ILogger bridge)

Folder Structure

Folder Purpose README
Compression/ Brotli, GZip, LZ4 compression (pure managed, WASM-compatible) README
Consts/ Project-wide constants, error codes, regex validation, environment config README
Enums/ Shared enums: AppType, MessageContextType, TrackingState README
Extensions/ Collection merge/sync, serialization extensions, utility extensions README
Helpers/ Token generation, observable collections, JSON utilities, password hashing, task helpers README
Interfaces/ Core interfaces: IId<T>, IForeignKey, IAcSerializableToJson README
Loggers/ Custom logging framework with MS.Extensions.Logging integration README
Serializers/ Serialization framework: Binary, JSON, Toon formats on shared infrastructure README

Root Files

  • AcDomain.cs — Singleton for process-level state: process name, build type detection (IsDeveloperVersion/IsProductVersion), processor count, thread-safe unique ID generators (NextUniqueInt32, NextUniqueInt64).

Dependencies

Dependency Purpose
AyCode.Utils Shared utilities (project reference)
AyCode.Core.Serializers.SourceGenerator Binary serializer source generation (analyzer)
AutoMapper Object mapping
MessagePack MessagePack serialization
Newtonsoft.Json JSON serialization (legacy, alongside System.Text.Json)
Microsoft.Extensions.Configuration.* appsettings.json + environment variable support
Microsoft.Extensions.Logging.Abstractions Logging abstractions