/// <summary> /// Return a string property /// </summary> /// <param name="propertyName">Name of the project property</param> /// <param name="finalValue">Whether to evaluate variables in the value.</param> /// <returns>Value of the property as a non-null string</returns> private string GetPropertyString(string propertyName, bool finalValue) { ProjectProperty property = new ProjectProperty(this.ProjectNode, propertyName); string propertyValue = property.GetValue(finalValue); if (propertyValue == null) { return(String.Empty); } return(propertyValue); }
/// <summary> /// Set a string project property /// </summary> /// <param name="propertyName">Property name</param> /// <param name="value">Property value</param> private void SetPropertyString(string propertyName, string value) { PropertyValidator.ValidateProperty(propertyName, value); if (!this.Node.ProjectMgr.QueryEditProjectFile(true)) { throw Marshal.GetExceptionForHR(VSConstants.OLE_E_PROMPTSAVECANCELLED); } ProjectProperty property = new ProjectProperty(this.ProjectNode, propertyName); property.SetValue(value); }
/// <summary> /// Set a string project property /// </summary> /// <param name="propertyName">Property name</param> /// <param name="value">Property value</param> private void SetPropertyString(string propertyName, string value) { PropertyValidator.ValidateProperty(propertyName, value); if (!this.Node.ProjectMgr.QueryEditProjectFile(true)) { throw Marshal.GetExceptionForHR(VSConstants.OLE_E_PROMPTSAVECANCELLED); } ProjectProperty property = new ProjectProperty(this.ProjectNode, propertyName); property.SetValue(value); }
/// <summary> /// Return a string property /// </summary> /// <param name="propertyName">Name of the project property</param> /// <param name="finalValue">Whether to evaluate variables in the value.</param> /// <returns>Value of the property as a non-null string</returns> private string GetPropertyString(string propertyName, bool finalValue) { ProjectProperty property = new ProjectProperty(this.ProjectNode, propertyName); string propertyValue = property.GetValue(finalValue); if (propertyValue == null) { return String.Empty; } return propertyValue; }