namespace AyCode.Core.Serializers.Binaries;

/// <summary>
/// Cached type conversion info. Using readonly struct to avoid heap allocation.
/// </summary>
readonly struct TypeConversionInfo
{
    public readonly Type UnderlyingType;
    public readonly TypeCode TypeCode;
    public readonly bool IsEnum;

    public TypeConversionInfo(Type underlyingType, TypeCode typeCode, bool isEnum)
    {
        UnderlyingType = underlyingType;
        TypeCode = typeCode;
        IsEnum = isEnum;
    }
}