ConfigurationSectionGroup.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. //
  2. // System.Configuration.ConfigurationSection.cs
  3. //
  4. // Authors:
  5. // Duncan Mak ([email protected])
  6. // Lluis Sanchez Gual ([email protected])
  7. //
  8. // Permission is hereby granted, free of charge, to any person obtaining
  9. // a copy of this software and associated documentation files (the
  10. // "Software"), to deal in the Software without restriction, including
  11. // without limitation the rights to use, copy, modify, merge, publish,
  12. // distribute, sublicense, and/or sell copies of the Software, and to
  13. // permit persons to whom the Software is furnished to do so, subject to
  14. // the following conditions:
  15. //
  16. // The above copyright notice and this permission notice shall be
  17. // included in all copies or substantial portions of the Software.
  18. //
  19. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  20. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  21. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  22. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  23. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  24. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  25. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  26. //
  27. // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
  28. //
  29. #if NET_2_0 && XML_DEP
  30. using System;
  31. namespace System.Configuration
  32. {
  33. public class ConfigurationSectionGroup
  34. {
  35. bool require_declaration;
  36. string name, path, type_name;
  37. ConfigurationSectionCollection sections;
  38. ConfigurationSectionGroupCollection groups;
  39. Configuration config;
  40. SectionGroupInfo group;
  41. public ConfigurationSectionGroup ()
  42. {
  43. }
  44. internal void Initialize (Configuration config, SectionGroupInfo group)
  45. {
  46. this.config = config;
  47. this.group = group;
  48. }
  49. internal void SetName (string name)
  50. {
  51. this.name = name;
  52. }
  53. [MonoTODO]
  54. public void RequireDeclaration (bool require)
  55. {
  56. this.require_declaration = require;
  57. }
  58. [MonoTODO]
  59. public bool IsDeclared {
  60. get { return require_declaration; }
  61. }
  62. public string Name {
  63. get { return name; }
  64. }
  65. [MonoTODO]
  66. public string Path {
  67. get { return path; }
  68. }
  69. public ConfigurationSectionGroupCollection SectionGroups {
  70. get {
  71. if (groups == null) groups = new ConfigurationSectionGroupCollection (config, group);
  72. return groups;
  73. }
  74. }
  75. public ConfigurationSectionCollection Sections {
  76. get {
  77. if (sections == null) sections = new ConfigurationSectionCollection (config, group);
  78. return sections;
  79. }
  80. }
  81. public string TypeName {
  82. get { return type_name;}
  83. set { type_name = value; }
  84. }
  85. }
  86. }
  87. #endif