Ejemplo n.º 1
0
 public override void WriteXml(XmlWriter writer)
 {
     foreach (var key in InnerValueAsDictionary.Keys)
     {
         PropertyEntryMultiSerializer.WriteXml(writer, key, InnerValueAsDictionary[key]);
     }
 }
Ejemplo n.º 2
0
        public override void ReadXml(XmlReader reader)
        {
            var wasEmpty = reader.IsEmptyElement;

            reader.Read();

            if (wasEmpty)
            {
                return;
            }

            while (reader.NodeType != XmlNodeType.EndElement)
            {
                if (reader.Name != "PropertyEntry")
                {
                    continue;
                }
                try
                {
                    var kv = PropertyEntryMultiSerializer.ReadXml(reader);
                    InnerValueAsDictionary.Add(kv.Key, kv.Value);
                }
                catch
                {
                }
            }
            reader.ReadEndElement();
        }