/Microsoft.Build/Microsoft.Build/Microsoft/Build/Execution/BuildRequestData.cs
C# | 182 lines | 166 code | 16 blank | 0 comment | 6 complexity | 15d42e3e523f15c0623f6afc6b230351 MD5 | raw file
Possible License(s): Apache-2.0, LGPL-3.0
- namespace Microsoft.Build.Execution
- {
- using Microsoft.Build.Collections;
- using Microsoft.Build.Shared;
- using System;
- using System.Collections.Generic;
- using System.Runtime;
- using System.Runtime.CompilerServices;
-
- public class BuildRequestData
- {
- [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
- public BuildRequestData(Microsoft.Build.Execution.ProjectInstance projectInstance, string[] targetsToBuild) : this(projectInstance, targetsToBuild, null, BuildRequestDataFlags.None)
- {
- }
-
- [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
- public BuildRequestData(Microsoft.Build.Execution.ProjectInstance projectInstance, string[] targetsToBuild, Microsoft.Build.Execution.HostServices hostServices) : this(projectInstance, targetsToBuild, hostServices, BuildRequestDataFlags.None)
- {
- }
-
- private BuildRequestData(string[] targetsToBuild, Microsoft.Build.Execution.HostServices hostServices, BuildRequestDataFlags flags)
- {
- ErrorUtilities.VerifyThrowArgumentNull(targetsToBuild, "targetsToBuild");
- this.HostServices = hostServices;
- this.TargetNames = new List<string>(targetsToBuild);
- this.Flags = flags;
- }
-
- public BuildRequestData(Microsoft.Build.Execution.ProjectInstance projectInstance, string[] targetsToBuild, Microsoft.Build.Execution.HostServices hostServices, BuildRequestDataFlags flags) : this(targetsToBuild, hostServices, flags)
- {
- ErrorUtilities.VerifyThrowArgumentNull(projectInstance, "projectInstance");
- ErrorUtilities.VerifyThrowArgument((hostServices == null) || (hostServices.GetNodeAffinity(projectInstance.FullPath) != NodeAffinity.OutOfProc), "ProjectInstanceConflictsWithAffinity");
- foreach (string str in targetsToBuild)
- {
- ErrorUtilities.VerifyThrowArgumentNull(str, "target");
- }
- this.ProjectInstance = projectInstance;
- this.ProjectFullPath = projectInstance.FullPath;
- this.GlobalPropertiesDictionary = projectInstance.GlobalPropertiesDictionary;
- this.ExplicitlySpecifiedToolsVersion = null;
- }
-
- [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
- public BuildRequestData(string projectFullPath, IDictionary<string, string> globalProperties, string toolsVersion, string[] targetsToBuild, Microsoft.Build.Execution.HostServices hostServices) : this(projectFullPath, globalProperties, toolsVersion, targetsToBuild, hostServices, BuildRequestDataFlags.None)
- {
- }
-
- public BuildRequestData(string projectFullPath, IDictionary<string, string> globalProperties, string toolsVersion, string[] targetsToBuild, Microsoft.Build.Execution.HostServices hostServices, BuildRequestDataFlags flags) : this(targetsToBuild, hostServices, flags)
- {
- ErrorUtilities.VerifyThrowArgumentLength(projectFullPath, "projectFullPath");
- ErrorUtilities.VerifyThrowArgumentNull(globalProperties, "globalProperties");
- this.ProjectFullPath = FileUtilities.NormalizePath(projectFullPath);
- this.TargetNames = (ICollection<string>) targetsToBuild.Clone();
- this.GlobalPropertiesDictionary = new PropertyDictionary<ProjectPropertyInstance>(globalProperties.Count);
- foreach (KeyValuePair<string, string> pair in globalProperties)
- {
- this.GlobalPropertiesDictionary.Set(new ProjectPropertyInstance(pair.Key, pair.Value));
- }
- this.ExplicitlySpecifiedToolsVersion = toolsVersion;
- }
-
- public string ExplicitlySpecifiedToolsVersion
- {
- [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
- get
- {
- return this.<ExplicitlySpecifiedToolsVersion>k__BackingField;
- }
- [CompilerGenerated]
- private set
- {
- this.<ExplicitlySpecifiedToolsVersion>k__BackingField = value;
- }
- }
-
- internal bool ExplicitToolsVersionSpecified
- {
- get
- {
- return (this.ExplicitlySpecifiedToolsVersion != null);
- }
- }
-
- public BuildRequestDataFlags Flags
- {
- [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
- get
- {
- return this.<Flags>k__BackingField;
- }
- [CompilerGenerated]
- private set
- {
- this.<Flags>k__BackingField = value;
- }
- }
-
- public ICollection<ProjectPropertyInstance> GlobalProperties
- {
- get
- {
- if (this.GlobalPropertiesDictionary != null)
- {
- return new ReadOnlyCollection<ProjectPropertyInstance>(this.GlobalPropertiesDictionary);
- }
- return ReadOnlyEmptyCollection<ProjectPropertyInstance>.Instance;
- }
- }
-
- internal PropertyDictionary<ProjectPropertyInstance> GlobalPropertiesDictionary
- {
- [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
- get
- {
- return this.<GlobalPropertiesDictionary>k__BackingField;
- }
- [CompilerGenerated]
- private set
- {
- this.<GlobalPropertiesDictionary>k__BackingField = value;
- }
- }
-
- public Microsoft.Build.Execution.HostServices HostServices
- {
- [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
- get
- {
- return this.<HostServices>k__BackingField;
- }
- [CompilerGenerated]
- private set
- {
- this.<HostServices>k__BackingField = value;
- }
- }
-
- public string ProjectFullPath
- {
- [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
- get
- {
- return this.<ProjectFullPath>k__BackingField;
- }
- [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
- internal set
- {
- this.<ProjectFullPath>k__BackingField = value;
- }
- }
-
- public Microsoft.Build.Execution.ProjectInstance ProjectInstance
- {
- [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
- get
- {
- return this.<ProjectInstance>k__BackingField;
- }
- [CompilerGenerated]
- private set
- {
- this.<ProjectInstance>k__BackingField = value;
- }
- }
-
- public ICollection<string> TargetNames
- {
- [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
- get
- {
- return this.<TargetNames>k__BackingField;
- }
- [CompilerGenerated]
- private set
- {
- this.<TargetNames>k__BackingField = value;
- }
- }
- }
- }
-