PersonalizationDictionary Class
TOC
Collapse the table of content
Expand the table of content

PersonalizationDictionary Class

 

Encapsulates basic validation rules that indicate whether a piece of custom data is considered personalizable in either User or Shared scope.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

System.Object
  System.Web.UI.WebControls.WebParts.PersonalizationDictionary

public class PersonalizationDictionary : IDictionary, ICollection, 
	IEnumerable

NameDescription
System_CAPS_pubmethodPersonalizationDictionary()

Initializes a new instance of the PersonalizationDictionary class.

System_CAPS_pubmethodPersonalizationDictionary(Int32)

Initializes a new instance of the PersonalizationDictionary class using the provided parameter.

NameDescription
System_CAPS_pubpropertyCount

Gets the number of entries in the dictionary.

System_CAPS_pubpropertyIsFixedSize

Gets whether the personalization dictionary is of a fixed size.

System_CAPS_pubpropertyIsReadOnly

Gets whether the personalization dictionary is read-only.

System_CAPS_pubpropertyIsSynchronized

Gets whether the personalization dictionary is synchronized.

System_CAPS_pubpropertyItem[String]

Gets or sets an entry in the personalization dictionary.

System_CAPS_pubpropertyKeys

Gets a reference to an ICollection object containing the keys for the personalization dictionary.

System_CAPS_pubpropertySyncRoot

Gets an object that can be used to synchronize access to the personalization dictionary.

System_CAPS_pubpropertyValues

Gets a reference to an ICollection object containing the values in the personalization dictionary.

NameDescription
System_CAPS_pubmethodAdd(String, PersonalizationEntry)

Adds personalization entries to the personalization dictionary.

System_CAPS_pubmethodClear()

Removes all custom state information from the current PersonalizationDictionary object.

System_CAPS_pubmethodContains(String)

Returns a value indicating whether a piece of custom state information with the same key is contained in the personalization dictionary.

System_CAPS_pubmethodCopyTo(DictionaryEntry[], Int32)

Copies the personalization dictionary state entries as DictionaryEntry instances into the specified array.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetEnumerator()

Returns an enumerator that can be used to iterate through the entries in the personalization dictionary.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodRemove(String)

Removes a custom state entry based on the provided key.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection.CopyTo(Array, Int32)

Implements the ICollection.CopyTo method for the PersonalizationDictionary class.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary.Add(Object, Object)

Implements the IDictionary.Add method for the PersonalizationDictionary class.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary.Contains(Object)

Implements the IDictionary.Contains method for the PersonalizationDictionary class.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary.Remove(Object)

Implements the IDictionary.Remove method for the PersonalizationDictionary class.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

Implements the IEnumerable.GetEnumerator method for the PersonalizationDictionary class.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDictionary.Item[Object]

Gets or sets the Item property value for the PersonalizationDictionary class.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

A PersonalizationDictionary instance is a collection of PersonalizationEntry objects, which consist of a personalization scope and an object value. These entries are assigned a key in the PersonalizationDictionary object.

A good practice is to add all properties to the dictionary using the Save method, regardless of the scope of the page. The .NET Framework saves the information in the appropriate way; for example, shared data is saved when the page is in Shared scope. However, shared properties are not saved when a Web Parts value is being saved, the page is in User scope, and the WebPart control was added with the page in Shared scope.

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft