AyCode.Core/AyCode.Core/Serializers/Attributes
Loretta 3671c70aa1 Fix SGen ref-handling asymmetry; add regression tests
Refactored AcBinarySourceGenerator to use RefAwareEmitPredicate for all ref-handling switch decisions, ensuring child property ref-marker logic is based solely on child compile-time flags. Fixed deserialization drift when parent disables ref-handling but child enables it. Added regression tests and new test models to verify correct round-trip behavior for duplicate child references in collections and dictionaries. Improved XML docs and updated conventions for summary tags. Added SGen string round-trip tests for medium UTF-8/ASCII cases.
2026-05-19 08:32:39 +02:00
..
AcBinarySerializableAttribute.cs Fix SGen ref-handling asymmetry; add regression tests 2026-05-19 08:32:39 +02:00
README.md Document AcBinary wire format, sync docs, update conventions 2026-03-29 09:11:57 +02:00

README.md

Attributes

Marker attributes for the serialization framework's source generation features.

Key Files

  • AcBinarySerializableAttribute.cs — Marks types for binary serialization source generation. When applied to a class/struct, the source generator produces optimized IGeneratedBinaryWriter/IGeneratedBinaryReader implementations, avoiding runtime reflection. Used in conjunction with Binaries/IGeneratedBinaryWriter.cs and Binaries/IGeneratedBinaryReader.cs.

Usage

[AcBinarySerializable]
public class MyType
{
    public int Id { get; set; }
    public string Name { get; set; }
}

Dependencies

  • None (standalone attribute definitions)
  • Consumed by the source generator and Binaries/ serializer at runtime via TypeMetadataWrapper registry lookup.