28 lines
895 B
C#
28 lines
895 B
C#
using AyCode.Core.Serializers.Attributes;
|
|
|
|
namespace AyCode.Core.Tests.TestModels;
|
|
|
|
/// <summary>
|
|
/// Intentionally NOT marked with [AcBinarySerializable].
|
|
/// Used to reproduce the generated-writer path where the parent has a complex reference property
|
|
/// without a generated writer on the child type.
|
|
/// </summary>
|
|
public class NonGeneratedComplexCustomer
|
|
{
|
|
public int Id { get; set; }
|
|
public string? Name { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Regression model for SGen complex-property null handling.
|
|
/// The Customer property is non-nullable in signature, but runtime data can still contain null.
|
|
/// Serializer must emit PropertySkip instead of dereferencing null.
|
|
/// </summary>
|
|
[AcBinarySerializable]
|
|
public class SGenNullComplexParent
|
|
{
|
|
public int Id { get; set; }
|
|
public NonGeneratedComplexCustomer Customer { get; set; } = null!;
|
|
public string? Note { get; set; }
|
|
}
|