コード例 #1
0
 void IXElementSerializable.Deserialize(System.Xml.Linq.XElement node, XmlDeserializeContext context)
 {
     this.Name        = node.Attribute(ns + "name", string.Empty);
     this.Description = node.Attribute(ns + "desc", string.Empty);
     this.InitFromConfiguration(UserRecentDataConfigurationSection.GetConfig().Categories[this.Name]);
     if (node.HasElements)
     {
         var items = node.Element(ns + "items");
         if (items != null)
         {
             foreach (var item in items.Elements(ns + "item"))
             {
                 PropertyValueCollection value = new PropertyValueCollection();
                 value.Deserialize(item, context);
                 this.Items.Add(value);
             }
         }
     }
 }