SettingsContext Class
Provides contextual information that the provider can use when persisting settings.
Assembly: System (in System.dll)
| Name | Description | |
|---|---|---|
![]() | SettingsContext() | Initializes a new instance of the SettingsContext class. |
| Name | Description | |
|---|---|---|
![]() | comparer | |
![]() | Count | |
![]() | EqualityComparer | Gets the IEqualityComparer to use for the Hashtable.(Inherited from Hashtable.) |
![]() | hcp | Obsolete. Gets or sets the object that can dispense hash codes.(Inherited from Hashtable.) |
![]() | IsFixedSize | |
![]() | IsReadOnly | |
![]() | IsSynchronized | |
![]() | Item(Object) | Gets or sets the value associated with the specified key.(Inherited from Hashtable.) |
![]() | Keys | Gets an ICollection containing the keys in the Hashtable.(Inherited from Hashtable.) |
![]() | SyncRoot | |
![]() | Values | Gets an ICollection containing the values in the Hashtable.(Inherited from Hashtable.) |
| Name | Description | |
|---|---|---|
![]() | Add(Object, Object) | |
![]() | Clear() | |
![]() | Clone() | |
![]() | Contains(Object) | |
![]() | ContainsKey(Object) | |
![]() | ContainsValue(Object) | |
![]() | CopyTo(Array, Int32) | |
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetEnumerator() | Returns an IDictionaryEnumerator that iterates through the Hashtable.(Inherited from Hashtable.) |
![]() | GetHash(Object) | Returns the hash code for the specified key.(Inherited from Hashtable.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetObjectData(SerializationInfo, StreamingContext) | Implements the ISerializable interface and returns the data needed to serialize the Hashtable.(Inherited from Hashtable.) |
![]() | GetType() | |
![]() | KeyEquals(Object, Object) | |
![]() | MemberwiseClone() | |
![]() | OnDeserialization(Object) | Implements the ISerializable interface and raises the deserialization event when the deserialization is complete.(Inherited from Hashtable.) |
![]() | Remove(Object) | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IEnumerable.GetEnumerator() | Returns an enumerator that iterates through a collection.(Inherited from Hashtable.) |
| Name | Description | |
|---|---|---|
![]() | AsParallel() | Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.) |
![]() | AsQueryable() | Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.) |
![]() | Cast(Of TResult)() | Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.) |
![]() | OfType(Of TResult)() | Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.) |
The SettingsContext class is the base class used by applications to provide contextual information to the settings provider. Although the class is not abstract, an application can choose to create a specialized class that inherits from SettingsContext class and provides additional information to specific types of providers. The provider can then examine contextual settings when writing properties.
The primary purpose of the SettingsContext class is to provide features that use the SettingsBase class and related infrastructure. The SettingsContext class provides additional feature-specific contextual information about the property data being stored by the SettingsBase instance. Therefore, it is very simple to store additional information in a SettingsContext class without deriving from it (or from other Settings* classes) in order to support additional feature-specific context information.
For example, ASP.NET uses the SettingsContext class to pass along the username associated with the data managed by a SettingsBase instance, as well as a property indicating whether the user is considered authenticated. In this way, ASP.NET uses the SettingsContext class to identify authenticated versus anonymous Profile data.
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.





