m31coding / M31.FluentAPI

Generate fluent builders for your C# classes with ease.
MIT License
94 stars 4 forks source link

Somewhat support partial classes #15

Closed Genmutant closed 3 months ago

Genmutant commented 3 months ago

I have models for which i would like to generate builders. They are annotated to be MemoryPackable, which requires the types to be partial for the serializing stuff to be generated.

I get the error that partial classes aren't supported with FluentApi. Is there a problem with ignoring that, given that I won't use any stuff from the other parts for the builder?

In the README I couldn't find the exact reason why partial classes aren't supported.

m31coding commented 3 months ago

Hi, thank you for raising this issue. Currently, partial classes are not supported because I haven't yet examined all potential edge cases. I assume this shortcoming is difficult to ignore on your side, as no builder is generated due to the diagnostic error.

I agree that supporting partial classes would be very beneficial, and I will look into this within the next 2-3 weeks.

Best regards, Kevin

Genmutant commented 3 months ago

as no builder is generated due to the diagnostic error.

I'll have to see if I can just set the error to ignored when I'm back at work tomorrow. Thanks for your fast answer!