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

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

            UserRecentDataCategory settings = new UserRecentDataCategory();

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

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

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

            return(settings);
        }
Esempio 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);
             }
         }
     }
 }
 public UserRecentDataCacheItemDependency()
 {
     this.originalConfigHashCode = UserRecentDataConfigurationSection.GetConfig().GetHashCode();
 }