2005-11-04 Chris Toshok <toshok@ximian.com>
authorChris Toshok <toshok@novell.com>
Fri, 4 Nov 2005 17:25:17 +0000 (17:25 -0000)
committerChris Toshok <toshok@novell.com>
Fri, 4 Nov 2005 17:25:17 +0000 (17:25 -0000)
* SettingsProvider.cs, SettingsPropertyValueCollection.cs,
SettingValueElement.cs, SettingElement.cs,
SettingsPropertyValue.cs, ApplicationSettingsBase.cs,
SettingsPropertyCollection.cs, SettingsProviderCollection.cs,
SettingElementCollection.cs: Add XML_DEPS and CONFIGURATION_DEPS
to get this to bootstrap compile.  What a pain.

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

mcs/class/System/System.Configuration/ApplicationSettingsBase.cs
mcs/class/System/System.Configuration/ChangeLog
mcs/class/System/System.Configuration/SettingElement.cs
mcs/class/System/System.Configuration/SettingElementCollection.cs
mcs/class/System/System.Configuration/SettingValueElement.cs
mcs/class/System/System.Configuration/SettingsPropertyCollection.cs
mcs/class/System/System.Configuration/SettingsPropertyValue.cs
mcs/class/System/System.Configuration/SettingsPropertyValueCollection.cs
mcs/class/System/System.Configuration/SettingsProvider.cs
mcs/class/System/System.Configuration/SettingsProviderCollection.cs

index 872b9efa93edd69276594111fb61f00c5b950fca..a3b341b0bca6cc99a08687b71456dba8e22febfb 100644 (file)
@@ -73,15 +73,18 @@ namespace System.Configuration {
 
                public void Reload ()
                {
+#if (CONFIGURATION_DEP)
                        foreach (SettingsProvider provider in Providers) {
                                IApplicationSettingsProvider iasp = provider as IApplicationSettingsProvider;
                                if (iasp != null)
                                        iasp.Reset (Context);
                        }
+#endif
                }
 
                public void Reset()
                {
+#if (CONFIGURATION_DEP)
                        foreach (SettingsProvider provider in Providers) {
                                IApplicationSettingsProvider iasp = provider as IApplicationSettingsProvider;
                                if (iasp != null)
@@ -89,10 +92,12 @@ namespace System.Configuration {
                        }
 
                        Reload ();
+#endif
                }
 
                public override void Save()
                {
+#if (CONFIGURATION_DEP)
                        /* ew.. this needs to be more efficient */
                        foreach (SettingsProvider provider in Providers) {
                                SettingsPropertyValueCollection cache = new SettingsPropertyValueCollection ();
@@ -105,6 +110,7 @@ namespace System.Configuration {
                                if (cache.Count > 0)
                                        provider.SetPropertyValues (Context, cache);
                        }
+#endif
                }
 
                public virtual void Upgrade()
@@ -224,6 +230,7 @@ namespace System.Configuration {
                        }
                }
 
+#if (CONFIGURATION_DEP)
                [Browsable (false)]
                public override SettingsPropertyCollection Properties {
                        get {
@@ -302,6 +309,7 @@ namespace System.Configuration {
                                return properties;
                        }
                }
+#endif
 
                [Browsable (false)]
                public override SettingsPropertyValueCollection PropertyValues {
index 7c2c235c7364d79680eab67ff9241343ccdb6353..c012aac173917a549354f3d3066735db90bda3ed 100644 (file)
@@ -1,3 +1,12 @@
+2005-11-04  Chris Toshok  <toshok@ximian.com>
+
+       * SettingsProvider.cs, SettingsPropertyValueCollection.cs,
+       SettingValueElement.cs, SettingElement.cs,
+       SettingsPropertyValue.cs, ApplicationSettingsBase.cs,
+       SettingsPropertyCollection.cs, SettingsProviderCollection.cs,
+       SettingElementCollection.cs: Add XML_DEPS and CONFIGURATION_DEPS
+       to get this to bootstrap compile.  What a pain.
+       
 2005-11-04  Chris Toshok  <toshok@ximian.com>
 
        * ApplicationSettingsBase.cs: remove unnecessary using.
index b7b2af6eaa3c8324ea7ccdb0c2b2d20cdd71c6b8..d86616e77d19394631e11dde01196aeab5da5825 100644 (file)
@@ -31,7 +31,10 @@ using System;
 
 namespace System.Configuration
 {
-       public sealed class SettingElement : ConfigurationElement
+       public sealed class SettingElement
+#if (CONFIGURATION_DEP)
+               : ConfigurationElement
+#endif
        {
                [MonoTODO]
                public SettingElement ()
@@ -45,8 +48,10 @@ namespace System.Configuration
                }
 
                [MonoTODO]
+#if (CONFIGURATION_DEP)
                [ConfigurationProperty ("name", DefaultValue="",
                                        Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
+#endif
                public string Name {
                        get {
                                throw new NotImplementedException ();
@@ -57,8 +62,10 @@ namespace System.Configuration
                }
 
                [MonoTODO]
+#if (CONFIGURATION_DEP)
                [ConfigurationProperty ("value", DefaultValue=null,
                                        Options = ConfigurationPropertyOptions.IsRequired)]
+#endif
                public SettingValueElement Value {
                        get {
                                throw new NotImplementedException ();
@@ -69,8 +76,10 @@ namespace System.Configuration
                }
 
                [MonoTODO]
+#if (CONFIGURATION_DEP)
                [ConfigurationProperty ("Serialize", DefaultValue=SettingsSerializeAs.String,
                                        Options = ConfigurationPropertyOptions.IsRequired)]
+#endif
                public SettingsSerializeAs SerializeAs {
                        get {
                                throw new NotImplementedException ();
@@ -80,12 +89,14 @@ namespace System.Configuration
                        }
                }
 
+#if (CONFIGURATION_DEP)
                [MonoTODO]
                protected override ConfigurationPropertyCollection Properties {
                        get {
                                throw new NotImplementedException ();
                        }
                }
+#endif
 
                public override bool Equals (object o)
                {
index cd960fc8af58dd1fc1a0f9378ace5891732287b5..91f91e45ef67d1d328d34a007ae757d43407e823 100644 (file)
@@ -31,7 +31,10 @@ using System;
 
 namespace System.Configuration
 {
-       public sealed class SettingElementCollection : ConfigurationElementCollection
+       public sealed class SettingElementCollection
+#if (CONFIGURATION_DEP)
+               : ConfigurationElementCollection
+#endif
        {
                public SettingElementCollection ()
                {
@@ -61,6 +64,7 @@ namespace System.Configuration
                        throw new NotImplementedException ();
                }
 
+#if (CONFIGURATION_DEP)
                [MonoTODO]
                protected override ConfigurationElement CreateNewElement ()
                {
@@ -86,6 +90,7 @@ namespace System.Configuration
                                throw new NotImplementedException ();
                        }
                }
+#endif
        }
 
 }
index 8cfe13f08b7628263e94b2f7308282a95d325471..2ee92244c6b3f672ed89623e40034f56d8f77482 100644 (file)
@@ -34,19 +34,24 @@ using System.Xml;
 
 namespace System.Configuration
 {
-       public sealed class SettingValueElement : ConfigurationElement
+       public sealed class SettingValueElement
+#if (CONFIGURATION_DEP)
+               : ConfigurationElement
+#endif
        {
                [MonoTODO]
                public SettingValueElement ()
                {
                }
 
+#if (CONFIGURATION_DEP)
                [MonoTODO]
                protected override ConfigurationPropertyCollection Properties {
                        get {
                                throw new NotImplementedException ();
                        }
                }
+#endif
 
 #if (XML_DEP)
                [MonoTODO]
@@ -75,6 +80,7 @@ namespace System.Configuration
                        throw new NotImplementedException ();
                }
 
+#if (CONFIGURATION_DEP)
                protected override bool IsModified ()
                {
                        throw new NotImplementedException ();
@@ -89,6 +95,7 @@ namespace System.Configuration
                {
                        throw new NotImplementedException ();
                }
+#endif
 
 #if (XML_DEP)
                protected override bool SerializeToXmlElement (XmlWriter writer, string elementName)
@@ -97,10 +104,12 @@ namespace System.Configuration
                }
 #endif
 
+#if (CONFIGURATION_DEP)
                protected override void Unmerge (ConfigurationElement sourceElement, ConfigurationElement parentElement, ConfigurationSaveMode saveMode)
                {
                        throw new NotImplementedException ();
                }
+#endif
        }
 
 }
index 6ff884e53819c8177eed0fe04bf38e96fdc057a0..b94a7a7114998bfd8ec91b3acd85c90adeb2e300 100644 (file)
@@ -29,7 +29,6 @@
 #if NET_2_0
 using System;
 using System.Collections;
-using System.Configuration.Provider;
 
 namespace System.Configuration
 {
index 20baec288150c5488ae7c860f5ca815b39156eb5..db1e781159289d0666f99395bf8b3da149b1ae4d 100644 (file)
@@ -30,7 +30,9 @@
 using System;
 using System.IO;
 using System.Runtime.Serialization.Formatters.Binary;
+#if (XML_DEP)
 using System.Xml.Serialization;
+#endif
 
 namespace System.Configuration
 {
@@ -114,6 +116,7 @@ namespace System.Configuration
                                                /* the docs say use a string type converter.. this means what? */
                                                serializedValue = propertyValue.ToString();
                                                break;
+#if (XML_DEP)
                                        case SettingsSerializeAs.Xml:
                                                XmlSerializer serializer = new XmlSerializer (propertyValue.GetType());
                                                StringWriter w = new StringWriter();
@@ -121,6 +124,7 @@ namespace System.Configuration
                                                serializer.Serialize (w, propertyValue);
                                                serializedValue = w.ToString();
                                                break;
+#endif
                                        case SettingsSerializeAs.Binary:
                                                BinaryFormatter bf = new BinaryFormatter ();
                                                MemoryStream ms = new MemoryStream ();
index b001a5eff7d61224c30abed3c236cb4dd92588bf..74c9259fd2cc394b1f1448b02aa8b7a8367c970a 100644 (file)
@@ -29,7 +29,6 @@
 #if NET_2_0
 using System;
 using System.Collections;
-using System.Configuration.Provider;
 
 namespace System.Configuration
 {
index 3fe34e00c8e48bab69da880dcf2e1296dfb44073..28e32a98868f08ee1860ab2476686548872b0ef4 100644 (file)
 #if NET_2_0
 using System;
 
+#if (CONFIGURATION_DEP)
 using System.Configuration.Provider;
+#endif
 
 namespace System.Configuration
 {
-
-       public abstract class SettingsProvider : ProviderBase
+       public abstract class SettingsProvider
+#if (CONFIGURATION_DEP)
+               : ProviderBase
+#endif
        {
                protected SettingsProvider ()
                {
index 79e9660ff648cabb4e5822dd5a674cf6ab6470c1..566e46ada026a65b5968fe2e2760f9c4d8308e43 100644 (file)
 #if NET_2_0
 using System;
 using System.Collections;
+#if (CONFIGURATION_DEP)
 using System.Configuration.Provider;
+#endif
 
 namespace System.Configuration
 {
-       public class SettingsProviderCollection : System.Configuration.Provider.ProviderCollection
+       public class SettingsProviderCollection
+#if (CONFIGURATION_DEP)
+               : ProviderCollection
+#endif
        {
                Hashtable providers;
 
@@ -42,10 +47,12 @@ namespace System.Configuration
                        providers = new Hashtable ();
                }
 
+#if (CONFIGURATION_DEP)
                public override void Add (ProviderBase provider)
                {
                        providers.Add (provider.Name, provider);
                }
+#endif
 
                public new SettingsProvider this [ string name ] { 
                        get {