public static string GetProperty(this Project project, string name, bool imported = true) { var property = project.GetProperty(name); if (property != null) { if (imported || !property.IsImported) { return(property.UnevaluatedValue); } } return(string.Empty); }
GetPropertyWithDefault(this Project project, string name, string defaultValue, bool imported = true) { var value = project.GetProperty(name, imported); return(string.IsNullOrEmpty(value) ? defaultValue : value); }
public static string GetProperty(this Project project, string name, bool imported = true) { var property = project.GetProperty(name); return(property == null || (!imported && property.IsImported) ? String.Empty : property.UnevaluatedValue); }