public SetConfigurationProperty ( string propertyName, string propertyValue ) : void | ||
propertyName | string | |
propertyValue | string | |
return | void |
public virtual void SetConfigurationProperty(string propertyName, string propertyValue)
{
if (!this.project.QueryEditProjectFile(false))
{
throw Marshal.GetExceptionForHR(VSConstants.OLE_E_PROMPTSAVECANCELLED);
}
// Старое значение строки формата: ConfigProvider.configString
string condition = MakeMSBuildCondition(ConfigurationName, PlatformName);
SetPropertyUnderCondition(propertyName, propertyValue, condition);
// property cache will need to be updated
this.currentConfig = null;
// Signal the output groups that something is changed
foreach (OutputGroup group in this.OutputGroups)
{
group.InvalidateGroup();
}
this.project.SetProjectFileDirty(true);
return;
}
/// <summary> /// Sets the value of a configuration dependent property. /// If the attribute does not exist it is created. /// If value is null it will be set to an empty string. /// </summary> /// <param name="name">property name.</param> /// <param name="value">value of property</param> public void SetConfigProperty(string name, string value) { CCITracing.TraceCall(); if (value == null) { value = String.Empty; } if (this.ProjectMgr != null) { for (int i = 0, n = this.projectConfigs.Length; i < n; i++) { ProjectConfig config = projectConfigs[i]; config.SetConfigurationProperty(name, value); } this.ProjectMgr.SetProjectFileDirty(true); } }