This (in theory) allows you to use .NET 9's partial auto-properties to generate default behavior.
A declaration like so:
public partial class MyNode : Node
{
// Minimal example
[Notify]
public partial float Value1 { get; set; }
// Complex example:
// - Additional modifiers are preserved (like "virtual").
// - Access modifiers of get/set are preserved ("protected get;").
// - Omitted implementations are likewise omitted in the output (no "set").
[Notify]
public partial virtual float Value2 { protected get; }
}
Should generate this:
// Minimal example
#if NET9_0_OR_GREATER
public partial float Value1
{
get => _value1.Get();
set => _value1.Set(value);
}
#endif
// Complex example
#if NET9_0_OR_GREATER
public partial virtual float Value2
{
protected get => _value2.Get();
}
#endif
Unfortunately, it's not clear to me how I'm supposed to actually test the implementation nor how I might write, build, & execute a formal test class/scene to verify the behavior. Was hoping you could provide guidance on that or review/verify the implementation yourself.
This (in theory) allows you to use .NET 9's partial auto-properties to generate default behavior.
A declaration like so:
Should generate this:
Unfortunately, it's not clear to me how I'm supposed to actually test the implementation nor how I might write, build, & execute a formal test class/scene to verify the behavior. Was hoping you could provide guidance on that or review/verify the implementation yourself.