Ejemplo n.º 1
0
        public void AddProperty(string name, string val)
        {
            MSBuildProperty prop = this.CreateProperty();

            prop.Name  = name;
            prop.Value = val;
            this.AppendProperty(prop);
        }
Ejemplo n.º 2
0
        public void AppendProperty(MSBuildProperty item)
        {
            // insert on this level
            this.properties.Add(item);
            // insert on underlaying level
            XmlNode tn = item.UnderlyingObject;

            uo.AppendChild(tn);
        }
Ejemplo n.º 3
0
        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);
                    }
                }
            }
        }
Ejemplo n.º 4
0
 public static string GetKeyForItem(MSBuildProperty item)
 {
     return(item.Name);
 }
Ejemplo n.º 5
0
        public MSBuildProperty CreateProperty()
        {
            MSBuildProperty res = new MSBuildProperty(this);

            return(res);
        }