当前位置: 首页>>代码示例>>C#>>正文


C# IPropertySet.SetValue方法代码示例

本文整理汇总了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);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:9,代码来源:CSharpCompilerParameters.cs

示例2: OnWriteConfiguration

		protected override void OnWriteConfiguration (ProgressMonitor monitor, ProjectConfiguration config, IPropertySet pset)
		{
			base.OnWriteConfiguration (monitor, config, pset);
			pset.SetValue ("OutputPath", config.OutputDirectory);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:5,代码来源:GenericProject.cs

示例3: OnWriteConfiguration

		protected override void OnWriteConfiguration (ProgressMonitor monitor, ProjectConfiguration config, IPropertySet pset)
		{
			base.OnWriteConfiguration (monitor, config, pset);
			if (MSBuildProject.IsNewProject)
				pset.SetValue ("ErrorReport", "prompt");
			
		}
开发者ID:ArsenShnurkov,项目名称:monodevelop,代码行数:7,代码来源:DotNetProject.cs

示例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);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:45,代码来源:ProjectConfiguration.cs


注:本文中的IPropertySet.SetValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。