Adds robust IId<T>-based reference deduplication to both serialization and deserialization. Objects with the same type and Id are now treated as the same reference, reducing output size and ensuring correct reference identity in complex graphs. Key changes: - TypeMetadataBase: Adds IdAccessorType, typed Id getters, and precomputed property arrays for zero-boxing and fast access. - AcSerializerCommon: Introduces IIdReferenceTracker for efficient (Type, Id) → object mapping. - SerializationReferenceTracker: Now supports both ReferenceEquals and IId-based tracking for scanning and writing. - AcBinarySerializer: Reference scan uses IId-aware deduplication, skipping types that don't need tracking. - AcBinaryDeserializer: Adds per-context IId caches to ensure reference identity on deserialization. - PropertyAccessorBase: Adds IsComplexType for fast scan decisions. - Populate/Chain: Integrated with new IId cache for correct deduplication. - Tests: Adds/updates tests for IId identity, cross-type safety, and diagnostics. - Benchmarks: Adds WithRef/NoRef and AcJson vs System.Text.Json. - Documentation: Includes detailed implementation plan and rationale. No breaking changes for types that do not use IId. Zero-boxing for int/long/Guid Ids. Reference identity is now preserved for all IId objects. |
||
|---|---|---|
| .. | ||
| Compression | ||
| Consts | ||
| Enums | ||
| Extensions | ||
| Helpers | ||
| Interfaces | ||
| Loggers | ||
| Properties | ||
| Serializers | ||
| AcDomain.cs | ||
| AyCode.Core.csproj | ||