本文整理汇总了C#中IPropertySet.SetValue方法的典型用法代码示例。如果您正苦于以下问题:C# IPropertySet.SetValue方法的具体用法?C# IPropertySet.SetValue怎么用?C# IPropertySet.SetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPropertySet
的用法示例。
在下文中一共展示了IPropertySet.SetValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
protected override void Write (IPropertySet pset, string toolsVersion)
{
pset.SetPropertyOrder ("DebugSymbols", "DebugType", "Optimize", "OutputPath", "DefineConstants", "ErrorReport", "WarningLevel", "TreatWarningsAsErrors", "DocumentationFile");
base.Write (pset, toolsVersion);
if (optimize.HasValue)
pset.SetValue ("Optimize", optimize.Value);
}
示例2: OnWriteConfiguration
protected override void OnWriteConfiguration (ProgressMonitor monitor, ProjectConfiguration config, IPropertySet pset)
{
base.OnWriteConfiguration (monitor, config, pset);
pset.SetValue ("OutputPath", config.OutputDirectory);
}
示例3: OnWriteConfiguration
protected override void OnWriteConfiguration (ProgressMonitor monitor, ProjectConfiguration config, IPropertySet pset)
{
base.OnWriteConfiguration (monitor, config, pset);
if (MSBuildProject.IsNewProject)
pset.SetValue ("ErrorReport", "prompt");
}
示例4: Write
internal protected virtual void Write (IPropertySet pset, string toolsVersion)
{
pset.SetPropertyOrder ("DebugSymbols", "DebugType", "Optimize", "OutputPath", "DefineConstants", "ErrorReport");
FilePath defaultImPath;
if (!string.IsNullOrEmpty (Platform))
defaultImPath = ParentItem.BaseIntermediateOutputPath.Combine (Platform, Name);
else
defaultImPath = ParentItem.BaseIntermediateOutputPath.Combine (Name);
pset.SetValue ("IntermediateOutputPath", IntermediateOutputDirectory, defaultImPath);
// xbuild returns 'false' for DebugSymbols if DebugType==none, no matter which value is defined
// in the project file. Here we avoid overwriting the value if it has not changed.
if (debugType != "none" || !debugTypeWasNone)
pset.SetValue ("DebugSymbols", debugMode, false);
pset.SetValue ("OutputPath", outputDirectory);
pset.SetValue ("ConsolePause", pauseConsoleOutput, true);
pset.SetValue ("ExternalConsole", externalConsole, false);
pset.SetValue ("Commandlineparameters", commandLineParameters, "");
pset.SetValue ("RunWithWarnings", runWithWarnings, true);
if (debugType != "none" || !debugTypeReadAsEmpty)
pset.SetValue ("DebugType", debugType, "");
// Save the env vars only if the dictionary has changed.
if (loadedEnvironmentVariables == null || loadedEnvironmentVariables.Count != environmentVariables.Count || loadedEnvironmentVariables.Any (e => !environmentVariables.ContainsKey (e.Key) || environmentVariables[e.Key] != e.Value)) {
if (environmentVariables.Count > 0) {
XElement e = new XElement (XName.Get ("EnvironmentVariables", MSBuildProject.Schema));
foreach (var v in environmentVariables) {
var val = new XElement (XName.Get ("Variable", MSBuildProject.Schema));
val.SetAttributeValue ("name", v.Key);
val.SetAttributeValue ("value", v.Value);
e.Add (val);
}
pset.SetValue ("EnvironmentVariables", e.ToString (SaveOptions.DisableFormatting));
} else
pset.RemoveProperty ("EnvironmentVariables");
loadedEnvironmentVariables = new Dictionary<string, string> (environmentVariables);
}
pset.WriteObjectProperties (this, GetType (), true);
}