You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.4 KiB

#if WITH_CONFIGURATION
namespace System.Configuration
{
//
// 摘要:
// 以声明方式指示 .NET Framework,以实例化配置属性。 此类不能被继承。
[AttributeUsage(AttributeTargets.Property)]
internal sealed class ConfigurationPropertyAttribute : Attribute
{
//
// 摘要:
// 初始化 System.Configuration.ConfigurationPropertyAttribute 类的新实例。
//
// 参数:
// name:
// 已定义的 System.Configuration.ConfigurationProperty 对象名称。
public ConfigurationPropertyAttribute(string name) { }
//
// 摘要:
// 获取经过修饰的配置元素属性的名称。
//
// 返回结果:
// 经过修饰的配置元素属性的名称。
public string Name { get; }
//
// 摘要:
// 获取或设置修饰属性的默认值。
//
// 返回结果:
// 表示经过修饰的配置元素属性默认值的对象。
public object DefaultValue { get; set; }
//
// 摘要:
// 为经过修饰的配置元素属性获取或设置 System.Configuration.ConfigurationPropertyOptions。
//
// 返回结果:
// 与该属性相关的 System.Configuration.ConfigurationPropertyOptions 枚举值之一。
public ConfigurationPropertyOptions Options { get; set; }
//
// 摘要:
// 获取或设置一个值,指示此属性集合是否为经过修饰的配置属性的默认属性集合。
//
// 返回结果:
// 如果该属性表示元素的默认集合,则为 true;否则为 false。 默认值为 false。
public bool IsDefaultCollection { get; set; }
//
// 摘要:
// 获取或设置一个值,该值指示经过修饰的元素属性是否为必需。
//
// 返回结果:
// 如果该属性是必需的,则为 true;否则为 false。 默认值为 false。
public bool IsRequired { get; set; }
//
// 摘要:
// 获取或设置一个值,该值指示此属性是否是该经过修饰的元素属性的 Key 属性。
//
// 返回结果:
// 如果此属性是该集合中元素的 Key 属性,则为 true;否则为 false。 默认值为 false。
public bool IsKey { get; set; }
}
}
#endif