From 7868b2bf885ddb545bf3febc69d47243bb8ff7dc Mon Sep 17 00:00:00 2001 From: Matthew Grogan Date: Wed, 7 May 2014 19:44:14 -0400 Subject: [PATCH] Preserve parent namespace when serializing lists --- RestSharp/Serializers/XmlSerializer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RestSharp/Serializers/XmlSerializer.cs b/RestSharp/Serializers/XmlSerializer.cs index 35422b694..a6fcca2d6 100644 --- a/RestSharp/Serializers/XmlSerializer.cs +++ b/RestSharp/Serializers/XmlSerializer.cs @@ -77,7 +77,7 @@ public string Serialize(object obj) { { itemTypeName = type.Name; } - var instance = new XElement(itemTypeName); + var instance = new XElement(itemTypeName.AsNamespaced(Namespace)); Map(instance, item); root.Add(instance); } @@ -155,7 +155,7 @@ where p.CanRead && p.CanWrite ? setting.Name : type.Name; } - var instance = new XElement(itemTypeName); + var instance = new XElement(itemTypeName.AsNamespaced(Namespace)); Map(instance, item); element.Add(instance); }