2010-07-06 Gonzalo Paniagua Javier <gonzalo@novell.com>
[mono.git] / mcs / class / System.Configuration / System.Configuration / ConnectionStringsSection.cs
index ba36a5baa7158a99b7d2f31f5f622c6257e8f15f..a891dd9ea6308af1542308c4eb7f0b4d26db32fc 100644 (file)
 
 #if NET_2_0
 
-#region Using directives
 using System;
 using System.Xml;
-#endregion
 
 namespace System.Configuration
 {
         public sealed class ConnectionStringsSection : ConfigurationSection
         {
-
-                #region Fields
                 private static readonly ConfigurationProperty _propConnectionStrings;
                 private static ConfigurationPropertyCollection _properties;
-                #endregion // Fields
 
-                #region Constructors
                 static ConnectionStringsSection ()
                 {
-                        _propConnectionStrings = new ConfigurationProperty (null, typeof (ConnectionStringSettingsCollection), 
+                        _propConnectionStrings = new ConfigurationProperty ("", typeof (ConnectionStringSettingsCollection), 
                                                                             null, ConfigurationPropertyOptions.IsDefaultCollection);
                         _properties = new ConfigurationPropertyCollection ();
                         _properties.Add (_propConnectionStrings);
                 }
-                public ConnectionStringsSection () : base ()
+
+                public ConnectionStringsSection ()
                 {
                 }
-                #endregion // Constructors
 
-                #region Properties
-               ConnectionStringSettingsCollection strings;
+
                [ConfigurationProperty ("", Options = ConfigurationPropertyOptions.IsDefaultCollection)]
                 public ConnectionStringSettingsCollection ConnectionStrings
                 {
-                        get {
-                               if (strings == null)
-                                       strings = new ConnectionStringSettingsCollection ();
-                               return strings;
-#if false
-                                return (ConnectionStringSettingsCollection) base [_propConnectionStrings];
-#endif
-                        }
+                       get { return (ConnectionStringSettingsCollection) base [_propConnectionStrings]; }
                 }
 
-               [MonoTODO ("this shouldn't be here, but it's necessary until the ConfigurationPropertyOptions.IsDefaultCollection stuff is hooked up properly.")]
-               protected internal override void DeserializeElement (XmlReader reader, bool serializeCollectionKey)
-               {
-                       ConnectionStrings.DeserializeElement (reader, serializeCollectionKey);
-               }
-
                 protected internal override ConfigurationPropertyCollection Properties
                 {
-                        get
-                        {
-                                return _properties;
-                        }
+                        get { return _properties; }
                 }
-                #endregion // Properties
 
             
                 protected internal override object GetRuntimeObject ()