public IProjectProperty AddProperty(string propertyName) { var propertyNode = new XElement(Xmlns.GetName(propertyName)); Node.Add(propertyNode); var property = new ProjectProperty(ProjectFile, this, propertyNode, propertyNode.Name.LocalName); Items.Add(property); return(property); }
public IProjectProperty AddProperty(string itemGroupName, string propertyName) { var propertyNode = new XElement(Xmlns.GetName(propertyName)); var groupNode = Node.Elements().FirstOrDefault(n => n.Name.LocalName == itemGroupName) ?? Node.AddElement(new XElement(Xmlns.GetName(itemGroupName))); groupNode.AddElement(propertyNode); var property = new ProjectProperty(ProjectFile, this, propertyNode, groupNode.Name.LocalName + "." + propertyNode.Name.LocalName); Items.Add(property); return(property); }