private void SerializeUsingReflection(XmlWriter xmlWriter, object?o, XmlSerializerNamespaces?namespaces, string?encodingStyle, string?id)
{
XmlMapping mapping = GetMapping();
var writer = new ReflectionXmlSerializationWriter(mapping, xmlWriter, namespaces == null || namespaces.Count == 0 ? DefaultNamespaces : namespaces, encodingStyle, id);
writer.WriteObject(o);
}