Exemplo n.º 1
0
 private static void WriteObject(
     XmlWriter xmlWriter,
     dynamic result)
 {
     Type type = result.GetType();
     if (type.IsPrimitive())
     {
         xmlWriter.WrapOutgoingType((object)result);
     }
     else if (type.IsArray)
     {
         WriteArray(xmlWriter, result);
     }
     else if (!type.IsPrimitive && type.IsClass)
     {
         WriteClass(xmlWriter, type, result);
     }
 }