* System.dll.sources: Added new classes in System.Configuration.
authorDuncan Mak <duncan@mono-cvs.ximian.com>
Mon, 16 Aug 2004 20:24:43 +0000 (20:24 -0000)
committerDuncan Mak <duncan@mono-cvs.ximian.com>
Mon, 16 Aug 2004 20:24:43 +0000 (20:24 -0000)
* NameObjectCollectionBase.cs: Fix line endings. It's mostly in
DOS endings, so I left it at that.
(GetEnumerator): Made virtual.

* ConfigurationElement.cs (InitializeDefault): Made virtual.

* AppSettingsSection.cs:
* Configuration.cs:
* ConfigurationLocation.cs:
* ConfigurationLocationCollection.cs:
* ConfigurationSection.cs:
* ConfigurationSectionCollection.cs:
* ConfigurationSectionGroup.cs:
* ConfigurationSectionGroupCollection.cs:
* ConnectionStringsSection.cs: Added stubs and bits of implementation.

Other than ConfigurationElementCollection and
ConnectionStringsSectionCollection, we now have the basic skeleton for
implementing the configuration system in the System.Configuration
namespace.

svn path=/trunk/mcs/; revision=32398

15 files changed:
mcs/class/System/ChangeLog
mcs/class/System/System.Collections.Specialized/ChangeLog
mcs/class/System/System.Collections.Specialized/NameObjectCollectionBase.cs
mcs/class/System/System.Configuration/AppSettingsSection.cs [new file with mode: 0644]
mcs/class/System/System.Configuration/ChangeLog
mcs/class/System/System.Configuration/Configuration.cs [new file with mode: 0644]
mcs/class/System/System.Configuration/ConfigurationElement.cs
mcs/class/System/System.Configuration/ConfigurationLocation.cs [new file with mode: 0644]
mcs/class/System/System.Configuration/ConfigurationLocationCollection.cs [new file with mode: 0644]
mcs/class/System/System.Configuration/ConfigurationSection.cs [new file with mode: 0644]
mcs/class/System/System.Configuration/ConfigurationSectionCollection.cs [new file with mode: 0644]
mcs/class/System/System.Configuration/ConfigurationSectionGroup.cs [new file with mode: 0644]
mcs/class/System/System.Configuration/ConfigurationSectionGroupCollection.cs [new file with mode: 0644]
mcs/class/System/System.Configuration/ConnectionStringsSection.cs [new file with mode: 0644]
mcs/class/System/System.dll.sources

index 46f3607592f9fc7568dad8f9d596d5107d14f8ba..b414667a2b5d81007234945b414a66764f172330 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-16  Duncan Mak  <duncan@ximian.com>
+
+       * System.dll.sources: Added new classes in System.Configuration.
+
 2004-07-14  Atsushi Enomoto  <atsushi@ximian.com>
 
        * System.dll.sources:
index 09d676aa18d2ec29a57c7349bae4d9cd19e358e7..a16b73498acc33ad432d704be85323ae64f532f3 100755 (executable)
@@ -1,3 +1,9 @@
+2004-08-16  Duncan Mak  <duncan@ximian.com>
+
+       * NameObjectCollectionBase.cs: Fix line endings. It's mostly in
+       DOS endings, so I left it at that.
+       (GetEnumerator): Made virtual.
+
 2004-06-14  Sebastien Pouliot  <sebastien@ximian.com>
 
        * HybridDictionary.cs: Fixed Contains for null argument (again). Return
index 327b7463bd1b0bc296dd85c1cef459eadf1c092b..9358a1c1970767a71632f307d8d3250c32ca35c0 100644 (file)
@@ -1,33 +1,33 @@
-//
-// System.Collections.Specialized.NameObjectCollectionBase.cs
-//
-// Author:
-//   Gleb Novodran
-//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-//
-// (C) Ximian, Inc.  http://www.ximian.com
 //\r
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+// System.Collections.Specialized.NameObjectCollectionBase.cs\r
+//\r
+// Author:\r
+//   Gleb Novodran\r
+//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)\r
+//\r
+// (C) Ximian, Inc.  http://www.ximian.com\r
+//\r
+\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
 \r
 using System;\r
 using System.Collections;\r
@@ -48,7 +48,7 @@ namespace System.Collections.Specialized
                private IComparer m_comparer;\r
                private int m_defCapacity;\r
                private bool m_readonly;\r
-               SerializationInfo infoCopy;
+               SerializationInfo infoCopy;\r
 \r
                internal IComparer Comparer {\r
                        get {return m_comparer;}\r
@@ -104,7 +104,7 @@ namespace System.Collections.Specialized
                \r
                /// <summary>\r
                /// SDK: Represents a collection of the String keys of a collection.\r
-               /// </summary>
+               /// </summary>\r
                [Serializable]\r
                public class KeysCollection : ICollection, IEnumerable\r
                {\r
@@ -221,12 +221,12 @@ namespace System.Collections.Specialized
                        m_NullKeyItem = null;                   */\r
                        //throw new Exception("Not implemented yet");\r
                }\r
-
-               protected NameObjectCollectionBase (SerializationInfo info, StreamingContext context)
-               {
-                       infoCopy = info;
-               }
-
+\r
+               protected NameObjectCollectionBase (SerializationInfo info, StreamingContext context)\r
+               {\r
+                       infoCopy = info;\r
+               }\r
+\r
                protected NameObjectCollectionBase( int capacity, IHashCodeProvider hashProvider, IComparer comparer )\r
                {\r
                        m_readonly = false;\r
@@ -265,35 +265,35 @@ namespace System.Collections.Specialized
                /// <remark>This enumerator returns the keys of the collection as strings.</remark>\r
                /// </summary>\r
                /// <returns></returns>\r
-               public IEnumerator GetEnumerator()\r
+               public virtual IEnumerator GetEnumerator()\r
                {\r
                        return new _KeysEnumerator(this);\r
                }\r
                // GetHashCode\r
-
-               // ISerializable
-               public virtual void GetObjectData (SerializationInfo info, StreamingContext context)
-               {
-                       if (info == null)
-                               throw new ArgumentNullException ("info");
-
-                       int count = Count;
-                       string [] keys = new string [count];
-                       object [] values = new object [count];
-                       int i = 0;
-                       foreach (_Item item in m_ItemsArray) {
-                               keys [i] = item.key;
-                               values [i] = item.value;
-                               i++;
-                       }
-
-                       info.AddValue ("m_hashprovider", m_hashprovider);
-                       info.AddValue ("m_comparer", m_comparer);
-                       info.AddValue ("m_readonly", m_readonly);
-                       info.AddValue ("keys", keys);
-                       info.AddValue ("values", values);
-               }
-
+\r
+               // ISerializable\r
+               public virtual void GetObjectData (SerializationInfo info, StreamingContext context)\r
+               {\r
+                       if (info == null)\r
+                               throw new ArgumentNullException ("info");\r
+\r
+                       int count = Count;\r
+                       string [] keys = new string [count];\r
+                       object [] values = new object [count];\r
+                       int i = 0;\r
+                       foreach (_Item item in m_ItemsArray) {\r
+                               keys [i] = item.key;\r
+                               values [i] = item.value;\r
+                               i++;\r
+                       }\r
+\r
+                       info.AddValue ("m_hashprovider", m_hashprovider);\r
+                       info.AddValue ("m_comparer", m_comparer);\r
+                       info.AddValue ("m_readonly", m_readonly);\r
+                       info.AddValue ("keys", keys);\r
+                       info.AddValue ("values", values);\r
+               }\r
+\r
                // ICollection\r
                public virtual int Count \r
                {\r
@@ -315,40 +315,40 @@ namespace System.Collections.Specialized
                {\r
                        throw new NotImplementedException ();\r
                }\r
-
-
-               // IDeserializationCallback
-               public virtual void OnDeserialization (object sender)
-               {
-                       SerializationInfo info = infoCopy;
-                       if (info == null)
-                               throw new SerializationException ("The object is not a SerializationInfo");
-
-                       infoCopy = null;
-                       m_hashprovider = (IHashCodeProvider) info.GetValue ("m_hashprovider",
-                                                                           typeof (IHashCodeProvider));
-
-                       if (m_hashprovider == null)
-                               throw new SerializationException ("The hash provider is null");
-
-                       m_comparer = (IComparer) info.GetValue ("m_comparer", typeof (IComparer));
-                       if (m_comparer == null)
-                               throw new SerializationException ("The comparer is null");
-
-                       m_readonly = info.GetBoolean ("m_readonly");
-                       string [] keys = (string []) info.GetValue ("keys", typeof (string []));
-                       if (keys == null)
-                               throw new SerializationException ("keys is null");
-
-                       object [] values = (object []) info.GetValue ("values", typeof (object []));
-                       if (values == null)
-                               throw new SerializationException ("values is null");
-
-                       Init ();
-                       int count = keys.Length;
-                       for (int i = 0; i < count; i++)
-                               BaseAdd (keys [i], values [i]);
-               }
+\r
+\r
+               // IDeserializationCallback\r
+               public virtual void OnDeserialization (object sender)\r
+               {\r
+                       SerializationInfo info = infoCopy;\r
+                       if (info == null)\r
+                               throw new SerializationException ("The object is not a SerializationInfo");\r
+\r
+                       infoCopy = null;\r
+                       m_hashprovider = (IHashCodeProvider) info.GetValue ("m_hashprovider",\r
+                                                                           typeof (IHashCodeProvider));\r
+\r
+                       if (m_hashprovider == null)\r
+                               throw new SerializationException ("The hash provider is null");\r
+\r
+                       m_comparer = (IComparer) info.GetValue ("m_comparer", typeof (IComparer));\r
+                       if (m_comparer == null)\r
+                               throw new SerializationException ("The comparer is null");\r
+\r
+                       m_readonly = info.GetBoolean ("m_readonly");\r
+                       string [] keys = (string []) info.GetValue ("keys", typeof (string []));\r
+                       if (keys == null)\r
+                               throw new SerializationException ("keys is null");\r
+\r
+                       object [] values = (object []) info.GetValue ("values", typeof (object []));\r
+                       if (values == null)\r
+                               throw new SerializationException ("values is null");\r
+\r
+                       Init ();\r
+                       int count = keys.Length;\r
+                       for (int i = 0; i < count; i++)\r
+                               BaseAdd (keys [i], values [i]);\r
+               }\r
                //--------------- Protected Instance Properties ----------------\r
                /// <summary>\r
                /// SDK: Gets or sets a value indicating whether the NameObjectCollectionBase instance is read-only.\r
@@ -386,8 +386,8 @@ namespace System.Collections.Specialized
                                        m_ItemsContainer.Add(name,newitem);\r
                                }\r
                        m_ItemsArray.Add(newitem);\r
-               }
-
+               }\r
+\r
                protected void BaseClear()\r
                {\r
                        if (this.IsReadOnly)\r
@@ -447,7 +447,7 @@ namespace System.Collections.Specialized
                                allValues[i] = BaseGet(i);\r
                        \r
                        return allValues;\r
-               }
+               }\r
 \r
                protected object[] BaseGetAllValues( Type type )\r
                {\r
@@ -475,7 +475,7 @@ namespace System.Collections.Specialized
                        return (m_ItemsContainer.Count>0);\r
 //                     throw new Exception("Not implemented yet");\r
                }\r
-
+\r
                protected void BaseRemove( string name )\r
                {\r
                        int cnt = 0;\r
@@ -501,7 +501,7 @@ namespace System.Collections.Specialized
                                        i++;\r
                                \r
                        }\r
-               }
+               }\r
 \r
                /// <summary>\r
                /// \r
diff --git a/mcs/class/System/System.Configuration/AppSettingsSection.cs b/mcs/class/System/System.Configuration/AppSettingsSection.cs
new file mode 100644 (file)
index 0000000..a2e9689
--- /dev/null
@@ -0,0 +1,81 @@
+//
+// System.Configuration.AppSettingsSection.cs
+//
+// Authors:
+//     Duncan Mak (duncan@ximian.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+
+#if NET_2_0
+#if XML_DEP
+using System;
+using System.Collections.Specialized;
+using System.Xml;
+
+namespace System.Configuration {
+
+        public sealed class AppSettingsSection : ConfigurationSection
+        {
+                public AppSettingsSection ()
+                {
+                }
+
+                protected internal override  bool IsModified ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                protected internal override void ReadXml (XmlReader reader, object context)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                protected internal override void Reset (
+                        ConfigurationElement parent_section, object context)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                protected internal override void ResetModified ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                protected internal override string WriteXml (
+                        ConfigurationElement parent, object context, string name, ConfigurationUpdateMode mode)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public string File {
+                        get { throw new NotImplementedException (); }
+                        set { throw new NotImplementedException (); }
+                }
+
+                public NameValueCollection Settings {
+                        get { throw new NotImplementedException (); }
+                }
+        }
+}
+#endif
+#endif
index d50e2ca37bf6302c904151916c610360719989fa..ca0454992b19557e4ec364342acb7fcf22dddbed 100644 (file)
@@ -1,9 +1,29 @@
+2004-08-16  Duncan Mak  <duncan@ximian.com>
+
+       * ConfigurationElement.cs (InitializeDefault): Made virtual.
+
+       * AppSettingsSection.cs:
+       * Configuration.cs:
+       * ConfigurationLocation.cs:
+       * ConfigurationLocationCollection.cs:
+       * ConfigurationSection.cs:
+       * ConfigurationSectionCollection.cs:
+       * ConfigurationSectionGroup.cs:
+       * ConfigurationSectionGroupCollection.cs:
+       * ConnectionStringsSection.cs: Added stubs and bits of implementation.
+
+       Other than ConfigurationElementCollection and
+       ConnectionStringsSectionCollection, we now have the basic skeleton
+       for implementing the configuration system in the
+       System.Configuration namespace.
+
 2004-08-11  Duncan Mak  <duncan@ximian.com>
 
        * ProtectedConfigurationProvider.cs: Use XML_DEP.
 
 2004-08-11  Duncan Mak  <duncan@ximian.com>    
 
+       * ProtectedConfigurationProvider.cs:
        * ProviderBase.cs: Implemented.
 
        * ConfigurationPropertyAttribute.cs: Implemented attribute.
diff --git a/mcs/class/System/System.Configuration/Configuration.cs b/mcs/class/System/System.Configuration/Configuration.cs
new file mode 100644 (file)
index 0000000..72e8527
--- /dev/null
@@ -0,0 +1,150 @@
+//
+// System.Configuration.ConfigurationLocation.cs
+//
+// Authors:
+//     Duncan Mak (duncan@ximian.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+#if NET_2_0
+using System;
+
+namespace System.Configuration {
+
+        public sealed class Configuration
+        {
+                internal Configuration ()
+                {
+                }
+
+                public AppSettingsSection AppSettings {
+                        get { throw new NotImplementedException (); }
+                }
+
+                public PathLevel ConfigurationPathLevel {
+                        get { throw new NotImplementedException (); }
+                }
+
+                public ConnectionStringsSection ConnectionStrings {
+                        get { throw new NotImplementedException (); }
+                }
+
+                public string FilePath {
+                        get { throw new NotImplementedException (); }
+                }
+
+                public bool HasFile {
+                        get { throw new NotImplementedException (); }
+                }
+
+                public ConfigurationLocationCollection Locations {
+                        get { throw new NotImplementedException (); }
+                }
+
+                public string Path {
+                        get { throw new NotImplementedException (); }
+                }
+
+                public ConfigurationSectionGroup RootSectionGroup {
+                        get { throw new NotImplementedException (); }                        
+                }
+
+                public ConfigurationSectionGroupCollection SectionGroups {
+                        get { throw new NotImplementedException (); }                        
+                }
+
+                public ConfigurationSectionCollection Sections {
+                        get { throw new NotImplementedException (); }                        
+                }
+
+                public static Configuration GetExeConfiguration (string path, ConfigurationUserLevel level)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public static Configuration GetMachineConfiguration ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public static Configuration GetMachineConfiguration (string path)
+                {
+                        throw new NotImplementedException ();
+                }
+                
+                public static Configuration GetMachineConfiguration (string path, string server)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public static Configuration GetMachineConfiguration (
+                                string path, string server, IntPtr user_token)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public static Configuration GetMachineConfiguration (
+                                string path, string server, string username, string password)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public static Configuration GetWebConfiguration ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public static Configuration GetWebConfiguration (string path)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public static Configuration GetWebConfiguration (string path, string site)
+                {
+                        throw new NotImplementedException ();
+                }
+                
+                public static Configuration GetWebConfiguration (string path, string site, string subpath)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public static Configuration GetWebConfiguration (
+                                string path, string site, string subpath, string server)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public static Configuration GetWebConfiguration (
+                                string path, string site, string subpath, string server, IntPtr user_token)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public static Configuration GetWebConfiguration (
+                                string path, string site, string subpath, string server, string username, string password)
+                {
+                        throw new NotImplementedException ();
+                }
+        }
+}
+#endif
index 800697ed4e676cdaaa09aa5c35969dd45550dfb0..67b63b5e834711aeeaaee6555e9e35256eb7a75d 100644 (file)
@@ -114,7 +114,7 @@ namespace System.Configuration
                         throw new NotImplementedException ();
                 }
 
-                protected internal void InitializeDefault ()
+                protected internal virtual void InitializeDefault ()
                 {
                         throw new NotImplementedException ();
                 }
diff --git a/mcs/class/System/System.Configuration/ConfigurationLocation.cs b/mcs/class/System/System.Configuration/ConfigurationLocation.cs
new file mode 100644 (file)
index 0000000..b8eff94
--- /dev/null
@@ -0,0 +1,48 @@
+//
+// System.Configuration.ConfigurationLocation.cs
+//
+// Authors:
+//     Duncan Mak (duncan@ximian.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+
+#if NET_2_0
+
+namespace System.Configuration {
+
+        public class ConfigurationLocation
+        {
+                string path;
+                
+                public string Path {
+                        get { return path; }
+                }
+
+                public Configuration GetConfiguration ()
+                {
+                        return null;
+                }
+        }
+}
+
+#endif
diff --git a/mcs/class/System/System.Configuration/ConfigurationLocationCollection.cs b/mcs/class/System/System.Configuration/ConfigurationLocationCollection.cs
new file mode 100644 (file)
index 0000000..91c45fb
--- /dev/null
@@ -0,0 +1,43 @@
+//
+// System.Configuration.ConfigurationLocation.cs
+//
+// Authors:
+//     Duncan Mak (duncan@ximian.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+
+#if NET_2_0
+
+using System.Collections;
+
+namespace System.Configuration {
+
+        public class ConfigurationLocationCollection : ReadOnlyCollectionBase
+        {
+                public ConfigurationLocation this [int index] {
+                        get { return this [index] as ConfigurationLocation; }
+                }
+        }
+}
+
+#endif
diff --git a/mcs/class/System/System.Configuration/ConfigurationSection.cs b/mcs/class/System/System.Configuration/ConfigurationSection.cs
new file mode 100644 (file)
index 0000000..436c9ac
--- /dev/null
@@ -0,0 +1,175 @@
+//
+// System.Configuration.ConfigurationSection.cs
+//
+// Authors:
+//     Duncan Mak (duncan@ximian.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+
+#if NET_2_0
+using System.Collections;
+using System.Xml;
+
+namespace System.Configuration
+{
+        public abstract class ConfigurationSection : ConfigurationElement
+        {
+                ConfigurationSection parent;
+                
+                ConfigurationAllowDefinition allow_definition;
+                bool allow_location, allow_override;
+                bool inherit_on_child_apps;
+                bool restart_on_external_changes;
+
+                string config_source;
+                bool force_update, is_declared, is_locked, is_protected;
+                string name, path, type_name;
+
+                ProtectedConfigurationProvider protected_provider;
+                
+                public ConfigurationSection ()
+                {
+                        allow_definition = ConfigurationAllowDefinition.Everywhere;
+                        allow_location = true;
+                        allow_override = true;
+                        inherit_on_child_apps = true;
+                        restart_on_external_changes = true;
+                }
+
+                public ConfigurationAllowDefinition AllowDefinition {
+                        get { return allow_definition; }
+                        set { allow_definition = value; }
+                }
+
+                public bool AllowLocation {
+                        get { return allow_location; }
+                        set { allow_location = value; }
+                }
+
+                public bool AllowOverride {
+                        get { return allow_override; }
+                        set { allow_override = value; }
+                }
+
+                public string ConfigSource {
+                        get { return config_source; }
+                        set { config_source = value; }
+                }
+
+                public bool ForceUpdate {
+                        get { return force_update; }
+                        set { force_update = value; }
+                }
+
+                public bool InheritInChildApplications {
+                        get { return inherit_on_child_apps; }
+                        set { inherit_on_child_apps = value; }
+                }
+
+                public bool IsDeclared {
+                        get { return is_declared; }
+                }
+
+                public bool IsLocked {
+                        get { return is_locked; }
+                }
+
+                public bool IsProtected {
+                        get { return is_protected; }
+                }
+
+                public string Name {
+                        get { return name; }
+                }
+
+                public string Path {
+                        get { return path; }
+                }
+
+                public ProtectedConfigurationProvider ProtectionProvider {
+                        get { return protected_provider; }
+                }
+
+                public bool RestartOnExternalChanges {
+                        get { return restart_on_external_changes; }
+                        set { restart_on_external_changes = value; }
+                }
+
+                public string TypeName {
+                        get { return type_name; }
+                        set { type_name = value; }
+                }
+
+                public ConfigurationSection GetParentSection ()
+                {
+                        return parent;
+                }
+
+                public XmlNode GetRawXml ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                protected internal virtual object GetRuntimeObject ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                protected internal override bool IsModified ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public void ProtectSection (string provider)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public void RequireDeclaration ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                protected internal override void ResetModified ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public void RevertToParent ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public void UnProtectSection ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public void UpdateRawXml (string xml)
+                {
+                        throw new NotImplementedException ();
+                }
+        }
+}
+
+#endif
diff --git a/mcs/class/System/System.Configuration/ConfigurationSectionCollection.cs b/mcs/class/System/System.Configuration/ConfigurationSectionCollection.cs
new file mode 100644 (file)
index 0000000..091251f
--- /dev/null
@@ -0,0 +1,41 @@
+//
+// System.Configuration.ConfigurationSectionCollection.cs
+//
+// Authors:
+//     Duncan Mak (duncan@ximian.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+
+#if NET_2_0
+using System;
+using System.Collections;
+using System.Collections.Specialized;
+
+namespace System.Configuration {
+
+        public sealed class ConfigurationSectionCollection : NameObjectCollectionBase
+        {
+                
+        }
+}
+#endif
diff --git a/mcs/class/System/System.Configuration/ConfigurationSectionGroup.cs b/mcs/class/System/System.Configuration/ConfigurationSectionGroup.cs
new file mode 100644 (file)
index 0000000..035b69c
--- /dev/null
@@ -0,0 +1,73 @@
+//
+// System.Configuration.ConfigurationSection.cs
+//
+// Authors:
+//     Duncan Mak (duncan@ximian.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+
+#if NET_2_0
+using System;
+
+namespace System.Configuration {
+
+        public class ConfigurationSectionGroup
+        {
+                bool require_declaration;
+                string name, path, type_name;
+
+                public ConfigurationSectionGroup ()
+                {
+                }
+
+                public void RequireDeclaration (bool require)
+                {
+                        this.require_declaration = require;
+                }
+
+                public bool IsDeclared {
+                        get { return require_declaration; }
+                }
+
+                public string Name {
+                        get { return path; }
+                }
+
+                public string Path {
+                        get { return path; }
+                }
+
+                public ConfigurationSectionGroupCollection SectionGroups {
+                        get { throw new NotImplementedException (); }
+                }
+
+                public ConfigurationSectionCollection Sections {
+                        get { throw new NotImplementedException (); }
+                }
+
+                public string TypeName {
+                        get { return type_name;}
+                }
+        }
+}
+#endif
diff --git a/mcs/class/System/System.Configuration/ConfigurationSectionGroupCollection.cs b/mcs/class/System/System.Configuration/ConfigurationSectionGroupCollection.cs
new file mode 100644 (file)
index 0000000..3e1dba6
--- /dev/null
@@ -0,0 +1,104 @@
+//
+// System.Configuration.ConfigurationSectionGroupCollection.cs
+//
+// Authors:
+//     Duncan Mak (duncan@ximian.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+
+#if NET_2_0
+using System;
+using System.Collections;
+using System.Collections.Specialized;
+
+namespace System.Configuration {
+
+        public sealed class ConfigurationSectionGroupCollection : NameObjectCollectionBase
+        {
+                public ICollection AllKeys {
+                        get { return BaseGetAllKeys (); }
+                }
+
+                public override int Count {
+                        get { throw new NotImplementedException (); }
+                }
+
+                public ConfigurationSectionGroup this [int index] {
+                        get { throw new NotImplementedException (); }
+                }
+
+                public ConfigurationSectionGroup this [string index] {
+                        get { throw new NotImplementedException (); }                        
+                }
+
+                public override NameObjectCollectionBase.KeysCollection Keys {
+                        get { throw new NotImplementedException (); }
+                }
+
+                public void Add (string name, ConfigurationSectionGroup section_group)
+                {
+                        BaseAdd (name, section_group);
+                }
+
+                public void Clear ()
+                {
+                        BaseClear ();
+                }
+
+                public void CopyTo (ConfigurationSectionGroup [] array, int index)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public ConfigurationSectionGroup Get (int index)
+                {
+                        return BaseGet (index) as ConfigurationSectionGroup;
+                }
+
+                public ConfigurationSectionGroup Get (string index)
+                {
+                        return BaseGet (index) as ConfigurationSectionGroup;
+                }
+
+                public override IEnumerator GetEnumerator ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public string GetKey (string index)
+                {
+                        throw new NotImplementedException ();
+                }
+
+                public void Remove (string index)
+                {
+                        BaseRemove (index);
+                }
+
+                public void RemoveAt (int index)
+                {
+                        BaseRemoveAt (index);
+                }
+        }
+}
+#endif
diff --git a/mcs/class/System/System.Configuration/ConnectionStringsSection.cs b/mcs/class/System/System.Configuration/ConnectionStringsSection.cs
new file mode 100644 (file)
index 0000000..48e56ad
--- /dev/null
@@ -0,0 +1,60 @@
+//
+// System.Configuration.ConnectionStringsSection.cs
+//
+// Authors:
+//     Duncan Mak (duncan@ximian.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+
+#if NET_2_0
+using System;
+
+namespace System.Configuration {
+
+        public sealed class ConnectionStringsSection : ConfigurationSection
+        {
+                public ConnectionStringsSection ()
+                {
+                }
+
+                protected internal override object GetRuntimeObject ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+                protected internal override void InitializeDefault ()
+                {
+                        throw new NotImplementedException ();
+                }
+
+//              [MonoTODO ("Implement ConnectionStringsSettingsCollection")]
+//              public ConnectionStringsSettingsCollection ConnectionStrings {
+//                      get { throw new NotImplementedException (); }
+//              }
+
+                protected internal override ConfigurationPropertyCollection Properties {
+                        get { throw new NotImplementedException (); }
+                }                                
+        }
+}
+#endif
index 8bc9716ea30291558ab865fb6b06d0eff305a00a..66f92352ee9a17a62f5fd1d1eed102f36978829c 100755 (executable)
@@ -322,23 +322,32 @@ System.ComponentModel.Design.Serialization/INameCreationService.cs
 System.ComponentModel.Design.Serialization/IDesignerLoaderService.cs
 System.ComponentModel.Design.Serialization/InstanceDescriptor.cs
 System.Configuration/AppSettingsReader.cs
+System.Configuration/AppSettingsSection.cs
 System.Configuration/ConfigHelper.cs
+System.Configuration/ConfigXmlDocument.cs
+System.Configuration/Configuration.cs
 System.Configuration/ConfigurationAllowDefinition.cs
 System.Configuration/ConfigurationElement.cs
 System.Configuration/ConfigurationException.cs
+System.Configuration/ConfigurationLocation.cs
+System.Configuration/ConfigurationLocationCollection.cs
 System.Configuration/ConfigurationProperty.cs
 System.Configuration/ConfigurationPropertyAttribute.cs
 System.Configuration/ConfigurationPropertyCollection.cs
 System.Configuration/ConfigurationPropertyFlags.cs
+System.Configuration/ConfigurationSection.cs
+System.Configuration/ConfigurationSectionCollection.cs
+System.Configuration/ConfigurationSectionGroup.cs
+System.Configuration/ConfigurationSectionGroupCollection.cs
 System.Configuration/ConfigurationSettings.cs
 System.Configuration/ConfigurationUpdateMode.cs
 System.Configuration/ConfigurationUserLevel.cs
 System.Configuration/ConfigurationValidationAttribute.cs
-System.Configuration/ConfigXmlDocument.cs
+System.Configuration/ConnectionStringsSection.cs
 System.Configuration/DictionarySectionHandler.cs
+System.Configuration/IConfigXmlNode.cs
 System.Configuration/IConfigurationSectionHandler.cs
 System.Configuration/IConfigurationSystem.cs
-System.Configuration/IConfigXmlNode.cs
 System.Configuration/IgnoreSectionHandler.cs
 System.Configuration/NameValueFileSectionHandler.cs
 System.Configuration/NameValueSectionHandler.cs