fix(csharp): serialize object oneOf variants
AN
17h ago+739+739+012345678901234567890123456789-0-0-0123456789
Description
Fixes #25547
For C# generichost object oneOf models without a discriminator, write the active variant's properties alongside properties declared on the wrapper.
Tests
- Added a focused generator regression test and a .NET runtime regression test using the existing
oneOfsample. - Verified both variants in a minimal generated client round-trip; before the fix serialization returned
{}. - Regenerated C# generichost samples and built the .NET 10 OneOf and Petstore samples.
- Verified the full public Dropbox C# client builds and preserves file/folder metadata on serialization with this change and #25546's fix applied locally.
Summary by cubic
Fixes #25547: C# generichost object oneOf models without a discriminator now serialize the active variant's properties alongside the wrapper's own properties, instead of producing {}.
- Updates
JsonConverter.mustacheto emitWritePropertiescalls for non-primitiveoneOfvariants before wrapper properties. - Adds a generator regression test, a .NET runtime regression test, and regenerated C# generichost samples.