From: Atsushi Eno Date: Mon, 28 May 2007 10:31:33 +0000 (-0000) Subject: 2007-05-28 Atsushi Enomoto X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=32f699f7ece7f7f820f5f7ae3c5507ddef9f7e2c;p=mono.git 2007-05-28 Atsushi Enomoto * SettingsProviderAttribute.cs : Return assembly qualified name. Check null args. * ConfigXmlDocument.cs : it implements IConfigErrorInfo. * ApplicationSettingsBaseTest.cs : enable working test. svn path=/trunk/mcs/; revision=78043 --- diff --git a/mcs/class/System/System.Configuration/ChangeLog b/mcs/class/System/System.Configuration/ChangeLog index cff6f49d2dc..766a7180516 100644 --- a/mcs/class/System/System.Configuration/ChangeLog +++ b/mcs/class/System/System.Configuration/ChangeLog @@ -1,3 +1,9 @@ +2007-05-28 Atsushi Enomoto + + * SettingsProviderAttribute.cs : + Return assembly qualified name. Check null args. + * ConfigXmlDocument.cs : it implements IConfigErrorInfo. + 2007-03-15 Vladimir Krasnov * SettingsPropertyValue.cs: fixed binary deserealization that may be diff --git a/mcs/class/System/System.Configuration/ConfigXmlDocument.cs b/mcs/class/System/System.Configuration/ConfigXmlDocument.cs index c75e24c0ac6..68104b0dfde 100644 --- a/mcs/class/System/System.Configuration/ConfigXmlDocument.cs +++ b/mcs/class/System/System.Configuration/ConfigXmlDocument.cs @@ -38,6 +38,9 @@ namespace System.Configuration { [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)] public sealed class ConfigXmlDocument : XmlDocument, IConfigXmlNode +#if NET_2_0 && CONFIGURATION_DEP + , System.Configuration.Internal.IConfigErrorInfo +#endif { XmlTextReader reader; string fileName; diff --git a/mcs/class/System/System.Configuration/SettingsProviderAttribute.cs b/mcs/class/System/System.Configuration/SettingsProviderAttribute.cs index bb7af89020a..283d6f92369 100644 --- a/mcs/class/System/System.Configuration/SettingsProviderAttribute.cs +++ b/mcs/class/System/System.Configuration/SettingsProviderAttribute.cs @@ -38,12 +38,16 @@ namespace System.Configuration public SettingsProviderAttribute (string providerTypeName) { + if (providerTypeName == null) + throw new ArgumentNullException ("providerTypeName"); this.providerTypeName = providerTypeName; } public SettingsProviderAttribute (Type providerType) { - this.providerTypeName = providerType.Name; + if (providerType == null) + throw new ArgumentNullException ("providerType"); + this.providerTypeName = providerType.AssemblyQualifiedName; } diff --git a/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs b/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs index b5a5b21d54b..118fd4fc753 100644 --- a/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs +++ b/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs @@ -283,9 +283,13 @@ namespace MonoTests.System.Configuration { } [Test] - [Category ("NotWorking")] public void TestSettings2_Properties () { + // This test will fail when there are newer versions + // of the test assemblies - so conditionalize it in + // such cases. + string expected = "MonoTests.System.Configuration.ProviderPoker, System_test_net_2_0, Version=0.0.0.0"; + Assert.AreEqual (expected, new SettingsProviderAttribute (typeof (ProviderPoker)).ProviderTypeName.Substring (0, expected.Length), "#1"); TestSettings2 settings = new TestSettings2 (); /* should throw ConfigurationException */ diff --git a/mcs/class/System/Test/System.Configuration/ChangeLog b/mcs/class/System/Test/System.Configuration/ChangeLog index 480f698fb75..f0251797fa0 100644 --- a/mcs/class/System/Test/System.Configuration/ChangeLog +++ b/mcs/class/System/Test/System.Configuration/ChangeLog @@ -1,3 +1,7 @@ +2007-05-28 Atsushi Enomoto + + * ApplicationSettingsBaseTest.cs : enable working test. + 2007-01-14 Vladimir Krasnov * SettingsPropertyValueTest.cs: added tests for IsDirty proprty