Author: toshok
Date: 2005-11-14 13:34:30 -0500 (Mon, 14 Nov 2005)
New Revision: 53026

Added:
   
trunk/mcs/class/System.Configuration/System.Configuration/CommaDelimitedStringCollectionConverter.cs
   trunk/mcs/class/System.Configuration/System.Configuration/DefaultSection.cs
Modified:
   trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
   
trunk/mcs/class/System.Configuration/System.Configuration/CommaDelimitedStringCollection.cs
Log:
2005-11-14  Chris Toshok  <[EMAIL PROTECTED]>

        * CommaDelimitedStringCollection.cs: reformat things a bit, and
        flag ToString() as override.

        * DefaultSection.cs: new stubbed out implementation.

        * CommaDelimitedStringCollectionConverter.cs: new implementation.



Modified: trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
===================================================================
--- trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog 
2005-11-14 17:39:19 UTC (rev 53025)
+++ trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog 
2005-11-14 18:34:30 UTC (rev 53026)
@@ -1,3 +1,12 @@
+2005-11-14  Chris Toshok  <[EMAIL PROTECTED]>
+
+       * CommaDelimitedStringCollection.cs: reformat things a bit, and
+       flag ToString() as override.
+
+       * DefaultSection.cs: new stubbed out implementation.
+
+       * CommaDelimitedStringCollectionConverter.cs: new implementation.
+
 2005-11-10  Chris Toshok  <[EMAIL PROTECTED]>
 
        * AppSettingsSection.cs (DeserializeElement): stop explicitly

Modified: 
trunk/mcs/class/System.Configuration/System.Configuration/CommaDelimitedStringCollection.cs
===================================================================
--- 
trunk/mcs/class/System.Configuration/System.Configuration/CommaDelimitedStringCollection.cs
 2005-11-14 17:39:19 UTC (rev 53025)
+++ 
trunk/mcs/class/System.Configuration/System.Configuration/CommaDelimitedStringCollection.cs
 2005-11-14 18:34:30 UTC (rev 53026)
@@ -41,24 +41,17 @@
                bool readOnly;
 
                public bool IsModified {
-                       get {
-                               return modified;
-                       }
+                       get { return modified; }
                }
 
                public new bool IsReadOnly {
-                       get {
-                               return readOnly;
-                       }
+                       get { return readOnly; }
                }
 
                public new string this [int index] {
-                       get {
-                               return base [index];
-                       }
+                       get { return base [index]; }
                        set {
-                               if (readOnly)
-                                       throw new ConfigurationErrorsException 
("The configuration is read only");
+                               if (readOnly) throw new 
ConfigurationErrorsException ("The configuration is read only");
 
                                base [index] = value;
                                modified = true;
@@ -67,8 +60,7 @@
 
                public new void Add (string value)
                {
-                       if (readOnly)
-                               throw new ConfigurationErrorsException ("The 
configuration is read only");
+                       if (readOnly) throw new ConfigurationErrorsException 
("The configuration is read only");
 
                        base.Add (value);
                        modified = true;
@@ -76,8 +68,7 @@
 
                public new void AddRange (string[] range)
                {
-                       if (readOnly)
-                               throw new ConfigurationErrorsException ("The 
configuration is read only");
+                       if (readOnly) throw new ConfigurationErrorsException 
("The configuration is read only");
 
                        base.AddRange (range);
                        modified = true;
@@ -85,8 +76,7 @@
 
                public new void Clear ()
                {
-                       if (readOnly)
-                               throw new ConfigurationErrorsException ("The 
configuration is read only");
+                       if (readOnly) throw new ConfigurationErrorsException 
("The configuration is read only");
 
                        base.Clear ();
                        modified = true;
@@ -105,8 +95,7 @@
 
                public new void Insert (int index, string value)
                {
-                       if (readOnly)
-                               throw new ConfigurationErrorsException ("The 
configuration is read only");
+                       if (readOnly) throw new ConfigurationErrorsException 
("The configuration is read only");
 
                        base.Insert (index, value);
                        modified = true;
@@ -114,8 +103,7 @@
 
                public new void Remove (string value)
                {
-                       if (readOnly)
-                               throw new ConfigurationErrorsException ("The 
configuration is read only");
+                       if (readOnly) throw new ConfigurationErrorsException 
("The configuration is read only");
 
                        base.Remove (value);
                        modified = true;
@@ -126,7 +114,7 @@
                        readOnly = true;
                }
 
-               public new string ToString ()
+               public override string ToString ()
                {
                        if (this.Count == 0)
                                return null;

Added: 
trunk/mcs/class/System.Configuration/System.Configuration/CommaDelimitedStringCollectionConverter.cs
===================================================================
--- 
trunk/mcs/class/System.Configuration/System.Configuration/CommaDelimitedStringCollectionConverter.cs
        2005-11-14 17:39:19 UTC (rev 53025)
+++ 
trunk/mcs/class/System.Configuration/System.Configuration/CommaDelimitedStringCollectionConverter.cs
        2005-11-14 18:34:30 UTC (rev 53026)
@@ -0,0 +1,64 @@
+//
+// System.Configuration.CommaDelimitedStringCollectionConverter.cs
+//
+// Authors:
+//     Chris Toshok ([EMAIL PROTECTED])
+//
+// 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) 2005 Novell, Inc (http://www.novell.com)
+//
+
+#if NET_2_0
+
+using System.ComponentModel;
+using System.Globalization;
+
+namespace System.Configuration
+{
+       public sealed class CommaDelimitedStringCollectionConverter: 
ConfigurationConverterBase
+       {
+               public CommaDelimitedStringCollectionConverter ()
+               {
+               }
+
+               public override object ConvertFrom (ITypeDescriptorContext ctx, 
CultureInfo ci, object data)
+               {
+                       CommaDelimitedStringCollection col = new 
CommaDelimitedStringCollection ();
+                       string[] datums = ((string)data).Split(',');
+
+                       foreach (string datum in datums)
+                               col.Add (datum.Trim());
+
+                       return col;
+               }
+
+               public override object ConvertTo (ITypeDescriptorContext ctx, 
CultureInfo ci, object value, Type type)
+               {
+                       if (value == null) return null;
+
+                       if (value.GetType() != typeof 
(CommaDelimitedStringCollection))
+                               throw new ArgumentException ();
+
+                       return value.ToString ();
+               }
+       }
+}
+#endif

Added: 
trunk/mcs/class/System.Configuration/System.Configuration/DefaultSection.cs
===================================================================
--- trunk/mcs/class/System.Configuration/System.Configuration/DefaultSection.cs 
2005-11-14 17:39:19 UTC (rev 53025)
+++ trunk/mcs/class/System.Configuration/System.Configuration/DefaultSection.cs 
2005-11-14 18:34:30 UTC (rev 53026)
@@ -0,0 +1,76 @@
+//
+// System.Configuration.DefaultSection
+//
+// Authors:
+//     Chris Toshok ([EMAIL PROTECTED])
+//
+// 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.Xml;
+
+namespace System.Configuration {
+
+       public sealed class DefaultSection : ConfigurationSection
+       {
+               static ConfigurationPropertyCollection properties;
+
+               static DefaultSection ()
+               {
+                       properties = new ConfigurationPropertyCollection ();
+               }
+
+               [MonoTODO]
+               protected internal override void DeserializeSection (XmlReader 
xmlReader)
+               {
+                       base.DeserializeSection (xmlReader);
+               }
+
+               [MonoTODO]
+               protected internal override bool IsModified ()
+               {
+                       return base.IsModified ();
+               }
+
+               [MonoTODO]
+               protected internal override void Reset (ConfigurationElement 
parentSection)
+               {
+                       base.Reset (parentSection);
+               }
+
+               [MonoTODO]
+               protected internal override void ResetModified ()
+               {
+                       base.ResetModified ();
+               }
+
+               [MonoTODO]
+               protected internal override string SerializeSection 
(ConfigurationElement parentSection, string name, ConfigurationSaveMode 
saveMode)
+               {
+                       return base.SerializeSection (parentSection, name, 
saveMode);
+               }
+       }
+}
+
+#endif

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to