Пример #1
0
        public string GetPropertyValue(string name, bool isXml = false)
        {
            MSBuildProperty prop = GetProperty(name);

            if (prop == null)
            {
                return(null);
            }
            else
            {
                return(prop.GetValue(isXml));
            }
        }
Пример #2
0
        public MSBuildProperty SetPropertyValue(string name, string value, bool preserveExistingCase, bool isXml = false)
        {
            MSBuildProperty p = GetProperty(name);

            if (p != null)
            {
                if (!preserveExistingCase || !string.Equals(value, p.GetValue(isXml), StringComparison.OrdinalIgnoreCase))
                {
                    p.SetValue(value, isXml);
                }
                return(p);
            }
            return(groups [0].SetPropertyValue(name, value, preserveExistingCase, isXml));
        }
Пример #3
0
 public void UnMerge(MSBuildPropertySet baseGrp, ISet <string> propsToExclude)
 {
     foreach (MSBuildProperty prop in baseGrp.Properties)
     {
         if (propsToExclude != null && propsToExclude.Contains(prop.Name))
         {
             continue;
         }
         MSBuildProperty thisProp = GetProperty(prop.Name);
         if (thisProp != null && prop.GetValue(true).Equals(thisProp.GetValue(true), StringComparison.OrdinalIgnoreCase))
         {
             RemoveProperty(prop.Name);
         }
     }
 }
Пример #4
0
        public string GetPropertyValue(string name, bool isXml = false)
        {
            MSBuildProperty prop = GetProperty(name);

            return(prop != null?prop.GetValue(isXml) : null);
        }