Merge pull request #3769 from evincarofautumn/fix-verify-before-allocs
[mono.git] / mcs / class / System / System.Net.Configuration / ConnectionManagementHandler.cs
index a2690cfb1863c159241a1e85a79724fe1377a1ce..36a1db9d29b399399e103b3c3bd6909bcb4da2e3 100644 (file)
@@ -32,8 +32,12 @@ using System.Collections;
 using System.Configuration;
 #if (XML_DEP)
 using System.Xml;
+#else
+using XmlNode = System.Object;
 #endif
 
+#pragma warning disable 618
+
 namespace System.Net.Configuration
 {
        class ConnectionManagementData
@@ -43,8 +47,8 @@ namespace System.Net.Configuration
                
                public ConnectionManagementData (object parent)
                {
-                       data = new Hashtable (CaseInsensitiveHashCodeProvider.Default,
-                                             CaseInsensitiveComparer.Default);
+                       data = new Hashtable (CaseInsensitiveHashCodeProvider.DefaultInvariant,
+                                             CaseInsensitiveComparer.DefaultInvariant);
                        if (parent != null && parent is ConnectionManagementData) {
                                ConnectionManagementData p = (ConnectionManagementData) parent;
                                foreach (string k in p.data.Keys)
@@ -95,11 +99,10 @@ namespace System.Net.Configuration
 
        class ConnectionManagementHandler : IConfigurationSectionHandler
        {
-#if (XML_DEP)
                public virtual object Create (object parent, object configContext, XmlNode section)
                {
                        ConnectionManagementData cmd = new ConnectionManagementData (parent);
-                       
+#if (XML_DEP)                  
                        if (section.Attributes != null && section.Attributes.Count != 0)
                                HandlersUtil.ThrowException ("Unrecognized attribute", section);
 
@@ -144,10 +147,10 @@ namespace System.Net.Configuration
 
                                HandlersUtil.ThrowException ("Unexpected element", child);
                        }
+#endif                 
 
                        return cmd;
                }
-#endif
        }
 
        internal class HandlersUtil