ConfigurationSection.cs 4.4 KB

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