Exemplo n.º 1
0
        // </snippet1>

        // <snippet2>
        public virtual void Save(PersonalizationDictionary state)
        {
            if ((_sharedUrls != null) && (_sharedUrls.Count != 0))
            {
                state["sharedUrls"] = new PersonalizationEntry(_sharedUrls, PersonalizationScope.Shared);
            }
            if ((_userUrls != null) && (_userUrls.Count != 0))
            {
                state["userUrls"] = new PersonalizationEntry(_userUrls, PersonalizationScope.User);
            }
        }
Exemplo n.º 2
0
 public void FillPersonalizationDictionary(Control control, ICollection propertyInfos, PersonalizationDictionary personalizations)
 {
     foreach (PropertyInfo propertyInfo in propertyInfos)
     {
         PersonalizableAttribute attribute = (PersonalizableAttribute)Attribute.GetCustomAttribute(propertyInfo, typeof(PersonalizableAttribute));
         PersonalizationEntry    entry     = new PersonalizationEntry(ReflectionServices.ExtractValue(control, propertyInfo.Name), attribute.Scope, attribute.IsSensitive);
         if (!personalizations.Contains(propertyInfo.Name))
         {
             personalizations.Add(propertyInfo.Name, entry);
         }
         else
         {
             personalizations[propertyInfo.Name] = entry;
         }
     }
 }
Exemplo n.º 3
0
        // <snippet1>
        public new virtual void Load(PersonalizationDictionary state)
        {
            if (state != null)
            {
                PersonalizationEntry sharedUrlsEntry = state["sharedUrls"];
                if (sharedUrlsEntry != null)
                {
                    _sharedUrls = (ArrayList)sharedUrlsEntry.Value;
                }

                PersonalizationEntry userUrlsEntry = state["userUrls"];
                if (userUrlsEntry != null)
                {
                    _userUrls = (ArrayList)userUrlsEntry.Value;
                }
            }
        }
Exemplo n.º 4
0
 // Methods
 public virtual void Add(string key, PersonalizationEntry value)
 {
 }
Exemplo n.º 5
0
 public void Save(PersonalizationDictionary state)
 {
     state["Script"] = new PersonalizationEntry(_script, PersonalizationScope.Shared, true);
 }
	// Methods
	public virtual void Add(string key, PersonalizationEntry value) {}