AyCode.Core/AyCode.Core/Serializers/Attributes/AcBinarySerializableAttribu...

18 lines
699 B
C#

using System;
namespace AyCode.Core.Serializers.Attributes;
/// <summary>
/// Marks a class or struct for Source Generator based binary serialization.
/// When applied, the Source Generator will create optimized serialize/deserialize methods
/// at compile time, eliminating the need for runtime reflection or compiled expressions.
/// </summary>
/// <remarks>
/// If this attribute is not present, the serializer falls back to the existing
/// compiled expression based approach which works for all types.
/// </remarks>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
public sealed class AcBinarySerializableAttribute : Attribute
{
}