Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SettingsContext Class

Provides contextual information that the provider can use when persisting settings.

Namespace:  System.Configuration
Assembly:  System (in System.dll)
[SerializableAttribute]
public class SettingsContext : Hashtable

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.

System.Object
  System.Collections.Hashtable
    System.Configuration.SettingsContext
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.