fix(csharp): serialize object oneOf variants

AN
17h ago
+739-0

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 oneOf sample.
  • 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.mustache to emit WriteProperties calls for non-primitive oneOf variants before wrapper properties.
  • Adds a generator regression test, a .NET runtime regression test, and regenerated C# generichost samples.