ConfigurationPropertyAttribute.cs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // System.Configuration.ConfigurationPropertyAttribute.cs
  3. //
  4. // Authors:
  5. // Duncan Mak ([email protected])
  6. //
  7. // Permission is hereby granted, free of charge, to any person obtaining
  8. // a copy of this software and associated documentation files (the
  9. // "Software"), to deal in the Software without restriction, including
  10. // without limitation the rights to use, copy, modify, merge, publish,
  11. // distribute, sublicense, and/or sell copies of the Software, and to
  12. // permit persons to whom the Software is furnished to do so, subject to
  13. // the following conditions:
  14. //
  15. // The above copyright notice and this permission notice shall be
  16. // included in all copies or substantial portions of the Software.
  17. //
  18. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  19. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  20. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  21. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  22. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  23. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  24. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  25. //
  26. // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
  27. //
  28. #if NET_2_0
  29. namespace System.Configuration
  30. {
  31. public sealed class ConfigurationPropertyAttribute : Attribute
  32. {
  33. string name;
  34. bool collection_key, default_collection_property, required_value;
  35. object default_value;
  36. ConfigurationPropertyFlags flags;
  37. public ConfigurationPropertyAttribute (string name)
  38. {
  39. this.name = name;
  40. }
  41. public bool CollectionKey {
  42. get { return collection_key; }
  43. set { collection_key = value; }
  44. }
  45. public bool DefaultCollectionProperty {
  46. get { return default_collection_property; }
  47. set { default_collection_property = value; }
  48. }
  49. public object DefaultValue {
  50. get { return default_value; }
  51. set { default_value = value; }
  52. }
  53. public ConfigurationPropertyFlags Flags {
  54. get { return flags; }
  55. set { flags = value; }
  56. }
  57. public string Name {
  58. get { return name; }
  59. set { name = value; }
  60. }
  61. public bool RequiredValue {
  62. get { return required_value; }
  63. set { required_value = value; }
  64. }
  65. }
  66. }
  67. #endif