示例#1
0
            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);
            }
示例#2
0
            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);
            }