public string GetPropertyValue(string name, bool isXml = false) { MSBuildProperty prop = GetProperty(name); if (prop == null) { return(null); } else { return(prop.GetValue(isXml)); } }
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)); }
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); } } }
public string GetPropertyValue(string name, bool isXml = false) { MSBuildProperty prop = GetProperty(name); return(prop != null?prop.GetValue(isXml) : null); }