Επεξεργασία

Κοινή χρήση μέσω


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
PersonalizationDictionary
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()

Initializes a new instance of the PersonalizationDictionary class.

PersonalizationDictionary(Int32)

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

Properties

Count

Gets the number of entries in the dictionary.

IsFixedSize

Gets whether the personalization dictionary is of a fixed size.

IsReadOnly

Gets whether the personalization dictionary is read-only.

IsSynchronized

Gets whether the personalization dictionary is synchronized.

Item[String]

Gets or sets an entry in the personalization dictionary.

Keys

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

SyncRoot

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

Values

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

Methods

Add(String, PersonalizationEntry)

Adds personalization entries to the personalization dictionary.

Clear()

Removes all custom state information from the current PersonalizationDictionary object.

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)

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

Equals(Object)

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

(Inherited from Object)
GetEnumerator()

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

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(String)

Removes a custom state entry based on the provided key.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32)

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

IDictionary.Add(Object, Object)

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

IDictionary.Contains(Object)

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

IDictionary.Item[Object]

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

IDictionary.Remove(Object)

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

IEnumerable.GetEnumerator()

Implements the GetEnumerator() method for the PersonalizationDictionary class.

Extension Methods

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to

See also