using System.Collections.Generic;
using System;
using System.Linq;
+using System.Xml;
using Microsoft.Build.Exceptions;
using Microsoft.Build.Internal;
get { return new CollectionFromEnumerable<ProjectChooseElement> (
new FilteredEnumerable<ProjectChooseElement> (Children)); }
}
- public override string Condition { get; set; }
+ public override string Condition {
+ get { return null; }
+ set {
+ throw new InvalidOperationException ("Can not set Condition.");
+ }
+ }
public ICollection<ProjectItemGroupElement> ItemGroups {
get { return new CollectionFromEnumerable<ProjectItemGroupElement> (
new FilteredEnumerable<ProjectItemGroupElement> (Children)); }
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);
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));
}
}
}