Fixes build
[mono.git] / mcs / class / System / System.Net.Configuration / ConnectionManagementSection.cs
old mode 100755 (executable)
new mode 100644 (file)
index d43c772..3f27c51
@@ -3,9 +3,10 @@
 //
 // Authors:
 //     Tim Coleman (tim@timcoleman.com)
+//     Chris Toshok (toshok@ximian.com)
 //
 // Copyright (C) Tim Coleman, 2004
-// (c) 2004 Novell, Inc. (http://www.novell.com)
+// (C) 2004,2005 Novell, Inc. (http://www.novell.com)
 //
 
 //
@@ -29,7 +30,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
+#if NET_2_0 && CONFIGURATION_DEP
 
 using System.Configuration;
 
@@ -39,42 +40,40 @@ namespace System.Net.Configuration
        {
                #region Fields
 
-               ConfigurationPropertyCollection properties;
-               static ConfigurationProperty connectionManagement = new ConfigurationProperty ("ConnectionManagement", typeof (ConnectionManagementElementCollection), new ConnectionManagementElementCollection ());
+               static ConfigurationProperty connectionManagementProp;
+               static ConfigurationPropertyCollection properties;
 
                #endregion // Fields
 
                #region Constructors
 
-               public ConnectionManagementSection ()
+               static ConnectionManagementSection ()
                {
+                       connectionManagementProp = new ConfigurationProperty ("ConnectionManagement", typeof (ConnectionManagementElementCollection),
+                                                                             null, ConfigurationPropertyOptions.IsDefaultCollection);
+
                        properties = new ConfigurationPropertyCollection ();
-                       properties.Add (connectionManagement);
+                       properties.Add (connectionManagementProp);
+               }
+
+               public ConnectionManagementSection ()
+               {
                }
 
                #endregion // Constructors
 
                #region Properties
 
+               [ConfigurationProperty ("", Options = ConfigurationPropertyOptions.IsDefaultCollection)]
                public ConnectionManagementElementCollection ConnectionManagement {
-                       get { return (ConnectionManagementElementCollection) base [connectionManagement]; }
+                       get { return (ConnectionManagementElementCollection) base [connectionManagementProp]; }
                }
 
-               protected internal override ConfigurationPropertyCollection Properties {
+               protected override ConfigurationPropertyCollection Properties {
                        get { return properties; }
                }
 
                #endregion // Properties
-
-               #region Methods
-
-               [MonoTODO]
-               protected internal override object GetRuntimeObject ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               #endregion // Methods
        }
 }