1.5 KiB
1.5 KiB
Extensions
Extension methods for collections, serialization, and common utilities.
Key Files
CollectionExtensions.cs—IList<T>extensions forIId<Guid>entities:UpdateCollection()(add/update/remove withTrackingState),FindIndex(),BinarySearch(), safe indexing.CollectionExtensionsInt.cs— Same as above but forIId<int>entities.SerializeObjectExtensions.cs— Unified serialization API via extension methods:.ToJson(),.JsonTo<T>()— JSON serialization (Newtonsoft + customHybridReferenceResolverwith Base62 semantic IDs).ToBinary(),.BinaryTo<T>()— Binary serialization.CloneTo<TDest>(),.CopyTo()— Object cloning.JsonToChain<T>(),.BinaryToChain<T>()— Multi-deserialize chains.BinaryToMerge<T>()— IId-aware collection merging- Includes:
JsonReferencePostProcessor(strips unreferenced$id),PooledStringWriter(StringBuilder pooling)
EnumExtensions.cs—GetDisplayName()viaDisplayAttributereflection.ExceptionExtensions.cs—GetCategoryAndMemberNameFromStackTraceString()for structured caller info extraction.GuidExtensions.cs—IsNullOrEmpty()forGuidandGuid?with[NotNullWhen]annotations.
LLM Maintenance: If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code.