public override void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context)
 {
     if (context == null)
     {
         XmlObjectSerializerWriteContext.WriteRootIXmlSerializable(xmlWriter, obj);
     }
     else
     {
         context.WriteIXmlSerializable(xmlWriter, obj);
     }
 }