Ejemplo n.º 1
0
        internal void InitFromConfiguration()
        {
            this._Categories = new UserRecentDataCategoryCollection();

            foreach (UserRecentDataCategoryConfigurationElement elem in UserRecentDataConfigurationSection.GetConfig().Categories)
            {
                this._Categories.Add(new UserRecentDataCategory(elem));
            }
        }
Ejemplo n.º 2
0
        private static UserRecentDataCategory GetDefaultCategorySettings(string category)
        {
            category.CheckStringIsNullOrEmpty("category");

            UserRecentDataCategory settings = new UserRecentDataCategory();

            settings.InitFromConfiguration(UserRecentDataConfigurationSection.GetConfig().Categories[category]);

            return(settings);
        }
Ejemplo n.º 3
0
        public static UserRecentDataConfigurationSection GetConfig()
        {
            UserRecentDataConfigurationSection settings = (UserRecentDataConfigurationSection)ConfigurationBroker.GetSection("userRecentDataSettings");

            if (settings == null)
            {
                settings = new UserRecentDataConfigurationSection();
            }

            return(settings);
        }
Ejemplo n.º 4
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);
             }
         }
     }
 }
Ejemplo n.º 5
0
 public UserRecentDataCacheItemDependency()
 {
     this.originalConfigHashCode = UserRecentDataConfigurationSection.GetConfig().GetHashCode();
 }