private ISerializer GetXmlSerializer(Type type) { if (DataContractHelper.IsDataContractType(type)) { return(new Utilities.DataContractSerializer(type)); } if (type == typeof(DynamicXml)) { return(new DynamicXmlSerializer()); } if (typeof(IDictionary <object, object>).IsAssignableFrom(type)) { return(new XmlDictionarySerializer("data")); } else { return(new XmlSerializer(type)); } }