public MSBuildProperty GetProperty(string name)
 {
     // Find property in reverse order, since the last set
     // value is the good one
     for (int n = groups.Count - 1; n >= 0; n--)
     {
         MSBuildPropertyGroup g = groups[n];
         MSBuildProperty      p = g.GetProperty(name);
         if (p != null)
         {
             return(p);
         }
     }
     return(null);
 }
Пример #2
0
 public void RemoveGroup(MSBuildPropertyGroup grp)
 {
     elemCache.Remove(grp.Element);
     grp.Element.ParentNode.RemoveChild(grp.Element);
 }
 public void Add(MSBuildPropertyGroup g)
 {
     groups.Add(g);
 }
 public void Add(MSBuildPropertyGroup g)
 {
     groups.Add(g);
 }
 private void Prune(MSBuildPropertyGroup g)
 {
     if (g != groups[0] && !g.Properties.Any())
     {
         // Remove this group since it's now empty
         g.Parent.RemoveGroup(g);
     }
 }
Пример #6
0
 private MSBuildPropertyGroup GetGroup(XmlElement elem)
 {
     MSBuildObject ob;
     if (elemCache.TryGetValue(elem, out ob))
         return (MSBuildPropertyGroup)ob;
     var it = new MSBuildPropertyGroup(this, elem);
     elemCache[elem] = it;
     return it;
 }
Пример #7
0
 public void RemoveGroup(MSBuildPropertyGroup grp)
 {
     elemCache.Remove(grp.Element);
     grp.Element.ParentNode.RemoveChild(grp.Element);
 }