Merge pull request #319 from pragmatrix/master
[mono.git] / mcs / class / System / System.Configuration / SettingsProviderAttribute.cs
index bb7af89020a167e6088b17a668d300cb183d3ba3..1cec2cd25b7bf862b7122fe036eb3430b0937730 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
 using System;
 
 namespace System.Configuration
@@ -38,12 +37,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;
                }
 
 
@@ -57,4 +60,3 @@ namespace System.Configuration
 
 }
 
-#endif