ConfigurationSection.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. //
  2. // System.Configuration.ConfigurationSection.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. #if XML_DEP
  30. using System.Collections;
  31. using System.Xml;
  32. namespace System.Configuration
  33. {
  34. public abstract class ConfigurationSection : ConfigurationElement
  35. {
  36. ConfigurationSection parent;
  37. ConfigurationAllowDefinition allow_definition;
  38. bool allow_location, allow_override;
  39. bool inherit_on_child_apps;
  40. bool restart_on_external_changes;
  41. string config_source;
  42. bool force_update, is_declared, is_locked, is_protected;
  43. string name, path, type_name;
  44. ProtectedConfigurationProvider protected_provider;
  45. public ConfigurationSection ()
  46. {
  47. allow_definition = ConfigurationAllowDefinition.Everywhere;
  48. allow_location = true;
  49. allow_override = true;
  50. inherit_on_child_apps = true;
  51. restart_on_external_changes = true;
  52. }
  53. public ConfigurationAllowDefinition AllowDefinition {
  54. get { return allow_definition; }
  55. set { allow_definition = value; }
  56. }
  57. public bool AllowLocation {
  58. get { return allow_location; }
  59. set { allow_location = value; }
  60. }
  61. public bool AllowOverride {
  62. get { return allow_override; }
  63. set { allow_override = value; }
  64. }
  65. public string ConfigSource {
  66. get { return config_source; }
  67. set { config_source = value; }
  68. }
  69. public bool ForceUpdate {
  70. get { return force_update; }
  71. set { force_update = value; }
  72. }
  73. public bool InheritInChildApplications {
  74. get { return inherit_on_child_apps; }
  75. set { inherit_on_child_apps = value; }
  76. }
  77. public bool IsDeclared {
  78. get { return is_declared; }
  79. }
  80. public bool IsLocked {
  81. get { return is_locked; }
  82. }
  83. public bool IsProtected {
  84. get { return is_protected; }
  85. }
  86. public string Name {
  87. get { return name; }
  88. }
  89. public string Path {
  90. get { return path; }
  91. }
  92. public ProtectedConfigurationProvider ProtectionProvider {
  93. get { return protected_provider; }
  94. }
  95. public bool RestartOnExternalChanges {
  96. get { return restart_on_external_changes; }
  97. set { restart_on_external_changes = value; }
  98. }
  99. public string TypeName {
  100. get { return type_name; }
  101. set { type_name = value; }
  102. }
  103. public ConfigurationSection GetParentSection ()
  104. {
  105. return parent;
  106. }
  107. public XmlNode GetRawXml ()
  108. {
  109. throw new NotImplementedException ();
  110. }
  111. protected internal virtual object GetRuntimeObject ()
  112. {
  113. throw new NotImplementedException ();
  114. }
  115. protected internal override bool IsModified ()
  116. {
  117. throw new NotImplementedException ();
  118. }
  119. public void ProtectSection (string provider)
  120. {
  121. throw new NotImplementedException ();
  122. }
  123. public void RequireDeclaration ()
  124. {
  125. throw new NotImplementedException ();
  126. }
  127. protected internal override void ResetModified ()
  128. {
  129. throw new NotImplementedException ();
  130. }
  131. public void RevertToParent ()
  132. {
  133. throw new NotImplementedException ();
  134. }
  135. public void UnProtectSection ()
  136. {
  137. throw new NotImplementedException ();
  138. }
  139. public void UpdateRawXml (string xml)
  140. {
  141. throw new NotImplementedException ();
  142. }
  143. }
  144. }
  145. #endif
  146. #endif