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

4 years ago
  1. #if WITH_CONFIGURATION
  2. namespace System.Configuration
  3. {
  4. //
  5. // 摘要:
  6. // 以声明方式指示 .NET Framework,以实例化配置属性。 此类不能被继承。
  7. [AttributeUsage(AttributeTargets.Property)]
  8. internal sealed class ConfigurationPropertyAttribute : Attribute
  9. {
  10. //
  11. // 摘要:
  12. // 初始化 System.Configuration.ConfigurationPropertyAttribute 类的新实例。
  13. //
  14. // 参数:
  15. // name:
  16. // 已定义的 System.Configuration.ConfigurationProperty 对象名称。
  17. public ConfigurationPropertyAttribute(string name) { }
  18. //
  19. // 摘要:
  20. // 获取经过修饰的配置元素属性的名称。
  21. //
  22. // 返回结果:
  23. // 经过修饰的配置元素属性的名称。
  24. public string Name { get; }
  25. //
  26. // 摘要:
  27. // 获取或设置修饰属性的默认值。
  28. //
  29. // 返回结果:
  30. // 表示经过修饰的配置元素属性默认值的对象。
  31. public object DefaultValue { get; set; }
  32. //
  33. // 摘要:
  34. // 为经过修饰的配置元素属性获取或设置 System.Configuration.ConfigurationPropertyOptions。
  35. //
  36. // 返回结果:
  37. // 与该属性相关的 System.Configuration.ConfigurationPropertyOptions 枚举值之一。
  38. public ConfigurationPropertyOptions Options { get; set; }
  39. //
  40. // 摘要:
  41. // 获取或设置一个值,指示此属性集合是否为经过修饰的配置属性的默认属性集合。
  42. //
  43. // 返回结果:
  44. // 如果该属性表示元素的默认集合,则为 true;否则为 false。 默认值为 false。
  45. public bool IsDefaultCollection { get; set; }
  46. //
  47. // 摘要:
  48. // 获取或设置一个值,该值指示经过修饰的元素属性是否为必需。
  49. //
  50. // 返回结果:
  51. // 如果该属性是必需的,则为 true;否则为 false。 默认值为 false。
  52. public bool IsRequired { get; set; }
  53. //
  54. // 摘要:
  55. // 获取或设置一个值,该值指示此属性是否是该经过修饰的元素属性的 Key 属性。
  56. //
  57. // 返回结果:
  58. // 如果此属性是该集合中元素的 Key 属性,则为 true;否则为 false。 默认值为 false。
  59. public bool IsKey { get; set; }
  60. }
  61. }
  62. #endif