Merge pull request #1079 from esdrubal/webclient_cancel
[mono.git] / mcs / class / Microsoft.Build / Microsoft.Build.Construction / ProjectOtherwiseElement.cs
index 9c25e506581456b118a5cc844ad1655216ef0d44..b8a2d6bec03d15421b3a81f8d7c931baf18cfe95 100644 (file)
@@ -29,6 +29,7 @@
 using System.Collections.Generic;
 using System;
 using System.Linq;
+using System.Xml;
 using Microsoft.Build.Exceptions;
 using Microsoft.Build.Internal;
 
@@ -62,9 +63,9 @@ namespace Microsoft.Build.Construction
                 internal override string XmlName {
                         get { return "Otherwise"; }
                 }
-                internal override ProjectElement LoadChildElement (string name)
+                internal override ProjectElement LoadChildElement (XmlReader reader)
                 {
-                        switch (name) {
+                        switch (reader.LocalName) {
                         case "PropertyGroup":
                                 var property = ContainingProject.CreatePropertyGroupElement ();
                                 AppendChild (property);
@@ -79,7 +80,7 @@ namespace Microsoft.Build.Construction
                                 return when;
                         default:
                                 throw new InvalidProjectFileException (string.Format (
-                                        "Child \"{0}\" is not a known node type.", name));
+                                        "Child \"{0}\" is not a known node type.", reader.LocalName));
                         }
                 }
         }