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)
}
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 ();
if (cache.Count > 0)
provider.SetPropertyValues (Context, cache);
}
+#endif
}
public virtual void Upgrade()
}
}
+#if (CONFIGURATION_DEP)
[Browsable (false)]
public override SettingsPropertyCollection Properties {
get {
return properties;
}
}
+#endif
[Browsable (false)]
public override SettingsPropertyValueCollection PropertyValues {
+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.
namespace System.Configuration
{
- public sealed class SettingElement : ConfigurationElement
+ public sealed class SettingElement
+#if (CONFIGURATION_DEP)
+ : ConfigurationElement
+#endif
{
[MonoTODO]
public SettingElement ()
}
[MonoTODO]
+#if (CONFIGURATION_DEP)
[ConfigurationProperty ("name", DefaultValue="",
Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
+#endif
public string Name {
get {
throw new NotImplementedException ();
}
[MonoTODO]
+#if (CONFIGURATION_DEP)
[ConfigurationProperty ("value", DefaultValue=null,
Options = ConfigurationPropertyOptions.IsRequired)]
+#endif
public SettingValueElement Value {
get {
throw new NotImplementedException ();
}
[MonoTODO]
+#if (CONFIGURATION_DEP)
[ConfigurationProperty ("Serialize", DefaultValue=SettingsSerializeAs.String,
Options = ConfigurationPropertyOptions.IsRequired)]
+#endif
public SettingsSerializeAs SerializeAs {
get {
throw new NotImplementedException ();
}
}
+#if (CONFIGURATION_DEP)
[MonoTODO]
protected override ConfigurationPropertyCollection Properties {
get {
throw new NotImplementedException ();
}
}
+#endif
public override bool Equals (object o)
{
namespace System.Configuration
{
- public sealed class SettingElementCollection : ConfigurationElementCollection
+ public sealed class SettingElementCollection
+#if (CONFIGURATION_DEP)
+ : ConfigurationElementCollection
+#endif
{
public SettingElementCollection ()
{
throw new NotImplementedException ();
}
+#if (CONFIGURATION_DEP)
[MonoTODO]
protected override ConfigurationElement CreateNewElement ()
{
throw new NotImplementedException ();
}
}
+#endif
}
}
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]
throw new NotImplementedException ();
}
+#if (CONFIGURATION_DEP)
protected override bool IsModified ()
{
throw new NotImplementedException ();
{
throw new NotImplementedException ();
}
+#endif
#if (XML_DEP)
protected override bool SerializeToXmlElement (XmlWriter writer, string elementName)
}
#endif
+#if (CONFIGURATION_DEP)
protected override void Unmerge (ConfigurationElement sourceElement, ConfigurationElement parentElement, ConfigurationSaveMode saveMode)
{
throw new NotImplementedException ();
}
+#endif
}
}
#if NET_2_0
using System;
using System.Collections;
-using System.Configuration.Provider;
namespace System.Configuration
{
using System;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
+#if (XML_DEP)
using System.Xml.Serialization;
+#endif
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();
serializer.Serialize (w, propertyValue);
serializedValue = w.ToString();
break;
+#endif
case SettingsSerializeAs.Binary:
BinaryFormatter bf = new BinaryFormatter ();
MemoryStream ms = new MemoryStream ();
#if NET_2_0
using System;
using System.Collections;
-using System.Configuration.Provider;
namespace System.Configuration
{
#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 ()
{
#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;
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 {