Exemple #1
0
        private void AddItem(string section, object item)
        {
            var serializer = XmlSerializerCache.GetOrAdd(item.GetType(), section);

            serializer.Serialize(this, item, XmlSerializerCache.BlankNamespace);
        }
Exemple #2
0
        internal static void ToXml(XmlWriter writer, object data, string xmlName)
        {
            var serializer = XmlSerializerCache.GetOrAdd(data.GetType(), xmlName);

            serializer.Serialize(writer, data, XmlSerializerCache.BlankNamespace);
        }