#!/usr/bin/env dotnet-script

#r "H:/Applications/Mango/Source/FruitBankHybridApp/FruitBank.Common/bin/Debug/net9.0/FruitBank.Common.dll"
#r "H:/Applications/Aycode/Source/AyCode.Core/AyCode.Core/bin/FruitBank/Debug/net9.0/AyCode.Core.dll"

using AyCode.Core.Serializers.Toons;
using FruitBank.Common.Dtos;

var toon = AcToonSerializer.SerializeTypeMetadata<OrderDto>();
Console.WriteLine(toon);

// Search for IsMeasurable property output
if (toon.Contains("business-logic:"))
{
    Console.WriteLine("\n✓ SUCCESS: business-logic attribute found!");
    var lines = toon.Split('\n');
    foreach (var line in lines)
    {
        if (line.Contains("IsMeasurable") || line.Contains("business-logic:"))
        {
            Console.WriteLine(line);
        }
    }
}
else
{
    Console.WriteLine("\n✗ FAIL: business-logic attribute NOT found!");
}
