ApplicationScopedSettingAttribute 类

定义

指定应用程序设置属性具有应用程序的所有用户的公用值。 此类不能被继承。

public ref class ApplicationScopedSettingAttribute sealed : System::Configuration::SettingAttribute
[System.AttributeUsage(System.AttributeTargets.Property)]
public sealed class ApplicationScopedSettingAttribute : System.Configuration.SettingAttribute
[<System.AttributeUsage(System.AttributeTargets.Property)>]
type ApplicationScopedSettingAttribute = class
    inherit SettingAttribute
Public NotInheritable Class ApplicationScopedSettingAttribute
Inherits SettingAttribute
继承
ApplicationScopedSettingAttribute
属性

注解

应用程序设置属性的范围基于应用程序或用户级别。 正如类别所暗示的那样,应用程序范围的设置属性向应用程序的所有用户提供统一值,而用户范围属性对于应用程序的每个用户都有专用值。

指示 ApplicationScopedSettingAttribute 属性应被视为应用程序级设置,设置提供程序应相应地做出适当的存储决策。

每个设置属性都需要范围属性。 如果未对属性应用或ApplicationScopedSettingAttributeUserScopedSettingAttribute属性,则设置提供程序无法识别该属性 - 它不会序列化。 但是,将这两个属性应用于同一属性是无效的。 此类尝试将导致 ConfigurationErrorsException 引发。

构造函数

名称 说明
ApplicationScopedSettingAttribute()

初始化 ApplicationScopedSettingAttribute 类的新实例。

属性

名称 说明
TypeId

在派生类中实现时,获取此 Attribute的唯一标识符。

(继承自 Attribute)

方法

名称 说明
Equals(Object)

返回一个值,该值指示此实例是否等于指定对象。

(继承自 Attribute)
GetHashCode()

返回此实例的哈希代码。

(继承自 Attribute)
GetType()

获取当前实例的 Type

(继承自 Object)
IsDefaultAttribute()

在派生类中重写时,指示此实例的值是否为派生类的默认值。

(继承自 Attribute)
Match(Object)

在派生类中重写时,返回一个值,该值指示此实例是否等于指定对象。

(继承自 Attribute)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
ToString()

返回一个表示当前对象的字符串。

(继承自 Object)

显式接口实现

名称 说明
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

将一组名称映射为对应的一组调度标识符。

(继承自 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

检索对象的类型信息,该信息可用于获取接口的类型信息。

(继承自 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

检索对象提供的类型信息接口的数量(0 或 1)。

(继承自 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

提供对对象公开的属性和方法的访问。

(继承自 Attribute)

适用于

另请参阅