Merge pull request #4618 from BrzVlad/feature-par-nrs
[mono.git] / mcs / class / System / System.Net.Configuration / WebRequestModuleHandler.cs
index 9d8eb4c1dadd3e16834d519c79d939a4f0cf3e3d..1bdf52da949c9952bb88fe1b193d263341de7a29 100644 (file)
@@ -32,15 +32,17 @@ using System.Collections;
 using System.Configuration;
 #if (XML_DEP)
 using System.Xml;
+#else
+using XmlNode = System.Object;
 #endif
 
 namespace System.Net.Configuration
 {
        class WebRequestModuleHandler : IConfigurationSectionHandler
        {
-#if (XML_DEP)
                public virtual object Create (object parent, object configContext, XmlNode section)
                {
+#if XML_DEP
                        if (section.Attributes != null && section.Attributes.Count != 0)
                                HandlersUtil.ThrowException ("Unrecognized attribute", section);
 
@@ -58,34 +60,36 @@ namespace System.Net.Configuration
                                        if (child.Attributes != null && child.Attributes.Count != 0)
                                                HandlersUtil.ThrowException ("Unrecognized attribute", child);
 
-                                       WebRequest.ClearPrefixes ();
+                                       WebRequest.PrefixList = new ArrayList ();
                                        continue;
                                }
 
-                               string prefix = HandlersUtil.ExtractAttributeValue ("prefix", child);
+                               //string prefix = HandlersUtil.ExtractAttributeValue ("prefix", child);
                                if (name == "add") {
-                                       string type = HandlersUtil.ExtractAttributeValue ("type", child, false);
+                                       //string type = HandlersUtil.ExtractAttributeValue ("type", child, false);
                                        if (child.Attributes != null && child.Attributes.Count != 0)
                                                HandlersUtil.ThrowException ("Unrecognized attribute", child);
 
-                                       WebRequest.AddPrefix (prefix, type);
-                                       continue;
+                                       throw new NotImplementedException ();
+                                       //WebRequest.PrefixList.Add (new WebRequestPrefixElement(prefix, type));
+                                       //continue;
                                }
 
                                if (name == "remove") {
                                        if (child.Attributes != null && child.Attributes.Count != 0)
                                                HandlersUtil.ThrowException ("Unrecognized attribute", child);
 
-                                       WebRequest.RemovePrefix (prefix);
-                                       continue;
+                                       throw new NotImplementedException ();
+                                       // WebRequest.RemovePrefix (prefix);
+                                       // continue;
                                }
 
                                HandlersUtil.ThrowException ("Unexpected element", child);
                        }
+#endif                 
 
                        return null;
                }
-#endif
        }
 }