Export (0) Print
Expand All
0 out of 5 rated this helpful - Rate this topic

SettingsContext Class

Note: This class is new in the .NET Framework version 2.0.

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

Namespace: System.Configuration
Assembly: System (in system.dll)

[SerializableAttribute] 
public class SettingsContext : Hashtable
/** @attribute SerializableAttribute() */ 
public class SettingsContext extends Hashtable
SerializableAttribute 
public class SettingsContext extends 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 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.