PropertyBag Class

Definition

Provides an IDictionary interface to pass a collection of key/value pair variables to IIS Manager.

public ref class PropertyBag sealed : System::Collections::IDictionary
public sealed class PropertyBag : System.Collections.IDictionary
type PropertyBag = class
    interface IDictionary
    interface ICollection
    interface IEnumerable
Public NotInheritable Class PropertyBag
Implements IDictionary
Inheritance
PropertyBag
Implements

Constructors

PropertyBag()

Initializes a new instance of the PropertyBag class with no state tracking.

PropertyBag(Boolean)

Initializes a new instance of the PropertyBag class, using the specified state tracking.

Properties

Count

Gets the number of items in the collection.

IsTrackingState

Gets a value indicating whether the collection is tracking state.

Item[Int32]

Gets or sets the element at the specified index location in the property bag.

Keys

Gets a collection that contains the keys of the collection.

ModifiedKeys

Gets the collection of keys that have been modified since the bag was cloned.

Values

Gets a collection that contains the values of the collection.

Methods

Add(Int32, Object)

Adds an element that has the specified integer key and value to the collection.

Clone()

Creates a new copy of the collection with state tracking enabled.

Clone(Boolean)

Creates a new copy of the collection with state tracking enabled, and that is optionally read-only.

Contains(Int32)

Determines whether the collection contains an element that has the specified key.

CreatePropertyBagFromState(String)

Deserializes a property bag from the specified state.

CreatePropertyBagFromState(String, Boolean)

Deserializes a property bag from the specified state and optionally makes it read-only.

GetState()

Serializes the state of the property bag into a string.

GetValue<T>(Int32)

Returns the value with the specified key, cast as the specified type.

GetValue<T>(Int32, T)

Returns the value with the specified key, cast as the specified type, or the specified default value if no item with the specified key is located in the collection.

IsModified()

Returns a value indicating whether the collection has been modified since it was created.

IsModified(Int32)

Returns a value indicating whether the specified item has been modified since it was created.

Remove(Object)

Deletes the item with the specified key from the collection.

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32)

For a description of this member, see the CopyTo(Array, Int32) method.

ICollection.IsSynchronized
ICollection.SyncRoot
IDictionary.Add(Object, Object)

For a description of this member, see the Add(Object, Object) method.

IDictionary.Clear()

For a description of this member, see the Clear() method.

IDictionary.Contains(Object)

For a description of this member, see the Contains(Object) method.

IDictionary.GetEnumerator()

For a description of this member, see the GetEnumerator() method.

IDictionary.IsFixedSize
IDictionary.IsReadOnly
IDictionary.Item[Object]
IEnumerable.GetEnumerator()

For a description of this member, see the GetEnumerator() method.

Applies to