2007-05-28 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Mon, 28 May 2007 10:31:33 +0000 (10:31 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Mon, 28 May 2007 10:31:33 +0000 (10:31 -0000)
* 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

mcs/class/System/System.Configuration/ChangeLog
mcs/class/System/System.Configuration/ConfigXmlDocument.cs
mcs/class/System/System.Configuration/SettingsProviderAttribute.cs
mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs
mcs/class/System/Test/System.Configuration/ChangeLog

index cff6f49d2dcde50ff7aeac2f5ae3ffe42b21d555..766a71805168ccfeae16daaabdcf4ff6569ed224 100644 (file)
@@ -1,3 +1,9 @@
+2007-05-28  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * SettingsProviderAttribute.cs :
+         Return assembly qualified name. Check null args.
+       * ConfigXmlDocument.cs : it implements IConfigErrorInfo.
+
 2007-03-15  Vladimir Krasnov  <vladimirk@mainsoft.com>
 
        * SettingsPropertyValue.cs: fixed binary deserealization that may be
index c75e24c0ac6237e1c86772f4dcdee4a41854fc2b..68104b0dfdec887dc63a2108696083b28c42c526 100644 (file)
@@ -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;
index bb7af89020a167e6088b17a668d300cb183d3ba3..283d6f923698df8f1d602268e0f4462faabf61c4 100644 (file)
@@ -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;
                }
 
 
index b5a5b21d54b5190b16e362b8a62b31c8cc0b4118..118fd4fc7530b434fd0529db98001f865dd6e687 100644 (file)
@@ -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 */
index 480f698fb75fefac97c6d0df0e0cd96021f3e451..f0251797fa0b7984112ad055b7c711b645bb9b65 100644 (file)
@@ -1,3 +1,7 @@
+2007-05-28  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ApplicationSettingsBaseTest.cs : enable working test.
+
 2007-01-14  Vladimir Krasnov  <vladimirk@mainsoft.com>
 
         * SettingsPropertyValueTest.cs: added tests for IsDirty proprty