PersonalizationDictionary PersonalizationDictionary PersonalizationDictionary PersonalizationDictionary Class

Definition

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

public ref class PersonalizationDictionary : System::Collections::IDictionary
public class PersonalizationDictionary : System.Collections.IDictionary
type PersonalizationDictionary = class
    interface IDictionary
    interface ICollection
    interface IEnumerable
Public Class PersonalizationDictionary
Implements IDictionary
Inheritance
PersonalizationDictionaryPersonalizationDictionaryPersonalizationDictionaryPersonalizationDictionary
Implements

Remarks

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.

Constructors

PersonalizationDictionary() PersonalizationDictionary() PersonalizationDictionary() PersonalizationDictionary()

Initializes a new instance of the PersonalizationDictionary class.

PersonalizationDictionary(Int32) PersonalizationDictionary(Int32) PersonalizationDictionary(Int32) PersonalizationDictionary(Int32)

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

Properties

Count Count Count Count

Gets the number of entries in the dictionary.

IsFixedSize IsFixedSize IsFixedSize IsFixedSize

Gets whether the personalization dictionary is of a fixed size.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Gets whether the personalization dictionary is read-only.

IsSynchronized IsSynchronized IsSynchronized IsSynchronized

Gets whether the personalization dictionary is synchronized.

Item[String] Item[String] Item[String] Item[String]

Gets or sets an entry in the personalization dictionary.

Keys Keys Keys Keys

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

SyncRoot SyncRoot SyncRoot SyncRoot

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

Values Values Values Values

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

Methods

Add(String, PersonalizationEntry) Add(String, PersonalizationEntry) Add(String, PersonalizationEntry) Add(String, PersonalizationEntry)

Adds personalization entries to the personalization dictionary.

Clear() Clear() Clear() Clear()

Removes all custom state information from the current PersonalizationDictionary object.

Contains(String) Contains(String) Contains(String) Contains(String)

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

CopyTo(DictionaryEntry[], Int32) CopyTo(DictionaryEntry[], Int32) CopyTo(DictionaryEntry[], Int32) CopyTo(DictionaryEntry[], Int32)

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

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

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

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(String) Remove(String) Remove(String) Remove(String)

Removes a custom state entry based on the provided key.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

Implements the CopyTo(Array, Int32) method for the PersonalizationDictionary class.

IDictionary.Add(Object, Object) IDictionary.Add(Object, Object) IDictionary.Add(Object, Object) IDictionary.Add(Object, Object)

Implements the Add(Object, Object) method for the PersonalizationDictionary class.

IDictionary.Contains(Object) IDictionary.Contains(Object) IDictionary.Contains(Object) IDictionary.Contains(Object)

Implements the Contains(Object) method for the PersonalizationDictionary class.

IDictionary.Item[Object] IDictionary.Item[Object] IDictionary.Item[Object] IDictionary.Item[Object]

Gets or sets the Item[Object] property value for the PersonalizationDictionary class.

IDictionary.Remove(Object) IDictionary.Remove(Object) IDictionary.Remove(Object) IDictionary.Remove(Object)

Implements the Remove(Object) method for the PersonalizationDictionary class.

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Implements the GetEnumerator() method for the PersonalizationDictionary class.

Extension Methods

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to

See also