public void AddProperty(string name, string val) { MSBuildProperty prop = this.CreateProperty(); prop.Name = name; prop.Value = val; this.AppendProperty(prop); }
public void AppendProperty(MSBuildProperty item) { // insert on this level this.properties.Add(item); // insert on underlaying level XmlNode tn = item.UnderlyingObject; uo.AppendChild(tn); }
void ParsePropertyGroupsAndProperties() { var xmlManager = new XmlNamespaceManager(this.UnderlyingObject.NameTable); xmlManager.AddNamespace("prefix", "http://schemas.microsoft.com/developer/msbuild/2003"); foreach (XmlElement xmlNode in this.UnderlyingObject.SelectNodes(@"//prefix:PropertyGroup", xmlManager)) { var propertyGroup = new MSBuildPropertyGroup(this); this.propertyGroups.Add(propertyGroup); foreach (XmlElement xmlNodeProperty in xmlNode.ChildNodes) { var propertyInstance = new MSBuildProperty(propertyGroup, xmlNodeProperty); if (this.properties.Contains(propertyInstance.Name) == false) { this.properties.Add(propertyInstance); } } } }
public static string GetKeyForItem(MSBuildProperty item) { return(item.Name); }
public MSBuildProperty CreateProperty() { MSBuildProperty res = new MSBuildProperty(this); return(res); }