4 instantiations of ProjectTargetInstance
Microsoft.Build (3)
Evaluation\Evaluator.cs (1)
583ProjectTargetInstance targetInstance = new ProjectTargetInstance(
Instance\ProjectInstance.cs (1)
2814ProjectTargetInstance target = new ProjectTargetInstance(
Instance\ProjectTargetInstance.cs (1)
587var instance = new ProjectTargetInstance();
Microsoft.Build.Engine.UnitTests (1)
TestData\ProjectInstanceTestObjects.cs (1)
172return new ProjectTargetInstance(
91 references to ProjectTargetInstance
Microsoft.Build (67)
BackEnd\Components\Logging\ProjectLoggingContext.cs (1)
271internal TargetLoggingContext LogTargetBatchStarted(string projectFullPath, ProjectTargetInstance target, string parentTargetName, TargetBuiltReason buildReason)
BackEnd\Components\Logging\TargetLoggingContext.cs (4)
34private ProjectTargetInstance _target; 39internal TargetLoggingContext(ProjectLoggingContext projectLoggingContext, string projectFullPath, ProjectTargetInstance target, string parentTargetName, TargetBuiltReason buildReason) 49string projectFullPath, ProjectTargetInstance target, string parentTargetName, 91internal ProjectTargetInstance Target
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
148var targetExists = _projectInstance.Targets.TryGetValue(targetName.name, out ProjectTargetInstance targetInstance);
BackEnd\Components\RequestBuilder\TargetEntry.cs (2)
94private ProjectTargetInstance _target; 272internal ProjectTargetInstance Target
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (3)
55internal TargetUpToDateChecker(ProjectInstance project, ProjectTargetInstance targetToAnalyze, ILoggingService loggingServices, BuildEventContext buildEventContext) 76internal ProjectTargetInstance TargetToAnalyze 1239private ProjectTargetInstance _targetToAnalyze;
BackEnd\Shared\BuildRequestConfiguration.cs (1)
1038private HashSet<string> GetProjectTargets(IDictionary<string, ProjectTargetInstance> projectTargets) => projectTargets.Keys.ToHashSet();
Construction\ProjectTargetElement.cs (1)
347internal ProjectTargetInstance TargetInstance { get; set; }
Construction\Solution\SolutionProjectGenerator.cs (13)
578ProjectTargetInstance target, 761var targetElement = traversalInstance.AddTarget( 1342ProjectTargetInstance target = metaprojectInstance.AddTarget(targetName ?? "Build", String.Empty, String.Empty, outputItemAsItem, null, String.Empty, String.Empty, String.Empty, String.Empty, false /* legacy target returns behaviour */); 1353private static void AddProjectBuildTask(ProjectInstance traversalProject, ProjectConfigurationInSolution projectConfiguration, ProjectTargetInstance target, string targetToBuild, string sourceItems, string condition, string outputItem) 1384private void AddMetaprojectBuildTask(ProjectInSolution project, ProjectTargetInstance target, string targetToBuild, string outputItem) 1854ProjectTargetInstance newTarget = metaprojectInstance.AddTarget(targetName ?? "Build", "'$(CurrentSolutionConfigurationContents)' != ''", null, null, null, null, null, null, null, false /* legacy target returns behaviour */); 1924ProjectTargetInstance newTarget = traversalProject.AddTarget("ValidateProjects", null, null, null, null, null, null, null, null, false /* legacy target returns behaviour */); 1976ProjectTargetInstance target = traversalProject.AddTarget(correctedTargetName, string.Empty, string.Empty, outputItemAsItem, null, string.Empty, dependOnTargets, string.Empty, string.Empty, false /* legacy target returns behaviour */); 1987private static void AddReferencesBuildTask(ProjectTargetInstance target, string targetToBuild, string outputItem) 2045ProjectTargetInstance targetElement = traversalProject.AddTarget(actualTargetName, null, null, outputItemAsItem, null, null, null, null, null, false /* legacy target returns behaviour */); 2347ProjectTargetInstance initialTarget = traversalProject.AddTarget("ValidateSolutionConfiguration", null, null, null, null, null, null, null, null, false /* legacy target returns behaviour */); 2382ProjectTargetInstance validateToolsVersionsTarget = traversalProject.AddTarget("ValidateToolsVersions", null, null, null, null, null, null, null, null, false /* legacy target returns behaviour */); 2395var initialTarget = traversalProject.AddTarget(
Definition\Project.cs (12)
699public IDictionary<string, ProjectTargetInstance> Targets => implementation.Targets; 2298public override IDictionary<string, ProjectTargetInstance> Targets 2305return ReadOnlyEmptyDictionary<string, ProjectTargetInstance>.Instance; 2308return new ObjectModel.ReadOnlyDictionary<string, ProjectTargetInstance>(_data.Targets); 4015private static WeakReference<RetrievableEntryHashSet<ProjectTargetInstance>> s_typicalTargetsCollection; 4232internal RetrievableEntryHashSet<ProjectTargetInstance> Targets { get; set; } 4274Targets = new RetrievableEntryHashSet<ProjectTargetInstance>(StringComparer.OrdinalIgnoreCase); 4340s_typicalTargetsCollection = new WeakReference<RetrievableEntryHashSet<ProjectTargetInstance>>(Targets); 4345if (s_typicalTargetsCollection.TryGetTarget(out RetrievableEntryHashSet<ProjectTargetInstance> candidate) && candidate.EntriesAreReferenceEquals(Targets)) 4467public ProjectTargetInstance GetTarget(string targetName) 4469Targets.TryGetValue(targetName, out ProjectTargetInstance target); 4476public void AddTarget(ProjectTargetInstance target)
Evaluation\Evaluator.cs (4)
547private static ProjectTargetInstance ReadNewTargetElement(ProjectTargetElement targetElement, bool parentProjectSupportsReturnsAttribute, EvaluationProfiler evaluationProfiler) 583ProjectTargetInstance targetInstance = new ProjectTargetInstance( 1033ProjectTargetInstance targetInstance = targetElement.TargetInstance ?? ReadNewTargetElement(targetElement, _projectSupportsReturnsAttribute[(ProjectRootElement)targetElement.Parent], _evaluationProfiler); 1036ProjectTargetInstance otherTarget = _data.GetTarget(targetName);
Evaluation\IEvaluatorData.cs (2)
281ProjectTargetInstance GetTarget(string targetName); 286void AddTarget(ProjectTargetInstance target);
Evaluation\LazyItemEvaluator.EvaluatorData.cs (2)
239public void AddTarget(ProjectTargetInstance target) 289public ProjectTargetInstance GetTarget(string targetName)
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (2)
160public ProjectTargetInstance GetTarget(string targetName) => _wrapped.GetTarget(targetName); 161public void AddTarget(ProjectTargetInstance target) => _wrapped.AddTarget(target);
Instance\ProjectInstance.cs (16)
84private RetrievableEntryHashSet<ProjectTargetInstance> _actualTargets; 91private IDictionary<string, ProjectTargetInstance> _targets; 541_actualTargets = new RetrievableEntryHashSet<ProjectTargetInstance>(StringComparer.OrdinalIgnoreCase); 542_targets = new ObjectModel.ReadOnlyDictionary<string, ProjectTargetInstance>(_actualTargets); 1253public IDictionary<string, ProjectTargetInstance> Targets 1818ProjectTargetInstance IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.GetTarget(string targetName) 1820ProjectTargetInstance targetInstance; 1831void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddTarget(ProjectTargetInstance target) 2318foreach (ProjectTargetInstance target in Targets.Values) 2460ProjectTargetInstance.FactoryForDeserialization, 2461capacity => new RetrievableEntryHashSet<ProjectTargetInstance>(capacity, MSBuildNameIgnoreCaseComparer.Default)); 2797internal ProjectTargetInstance AddTarget( 2814ProjectTargetInstance target = new ProjectTargetInstance( 3092_actualTargets = new RetrievableEntryHashSet<ProjectTargetInstance>(StringComparer.OrdinalIgnoreCase); 3093_targets = new ObjectModel.ReadOnlyDictionary<string, ProjectTargetInstance>(_actualTargets); 3205IDictionary<string, ProjectTargetInstance> targets,
Instance\ProjectTargetInstance.cs (2)
585internal static ProjectTargetInstance FactoryForDeserialization(ITranslator translator) 587var instance = new ProjectTargetInstance();
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (1)
86public abstract IDictionary<string, ProjectTargetInstance> Targets { get; }
Microsoft.Build.Engine.OM.UnitTests (8)
Instance\ProjectTargetInstance_Tests.cs (7)
27ProjectTargetInstance target = GetSampleTargetInstance(); 59ProjectTargetInstance target = instance.Targets["t"]; 79ProjectTargetInstance target = instance.Targets["t;"]; 99ProjectTargetInstance target = instance.Targets["t;"]; 122ProjectTargetInstance target = project.Targets["t"]; 135private static ProjectTargetInstance GetSampleTargetInstance() 149ProjectTargetInstance target = instance.Targets["t"];
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectLink.cs (1)
186public override IDictionary<string, ProjectTargetInstance> Targets => throw new NotImplementedException();
Microsoft.Build.Engine.UnitTests (16)
Construction\SolutionProjectGenerator_Tests.cs (5)
1352foreach (ProjectTargetInstance target in instance.Targets.Values) 1534ProjectTargetInstance buildTarget = instances[0].Targets.Where(target => String.Equals(target.Value.Name, "Build", StringComparison.OrdinalIgnoreCase)).First().Value; 1535ProjectTargetInstance cleanTarget = instances[0].Targets.Where(target => String.Equals(target.Value.Name, "Clean", StringComparison.OrdinalIgnoreCase)).First().Value; 1536ProjectTargetInstance rebuildTarget = instances[0].Targets.Where(target => String.Equals(target.Value.Name, "Rebuild", StringComparison.OrdinalIgnoreCase)).First().Value; 1537ProjectTargetInstance publishTarget = instances[0].Targets.Where(target => String.Equals(target.Value.Name, "Publish", StringComparison.OrdinalIgnoreCase)).First().Value;
Instance\ProjectInstance_Internal_Tests.cs (3)
476var firstTasks = first.Targets["t"]; 477var secondTasks = second.Targets["t"]; 787ProjectTargetInstance targetInstance = projectInstance.AddTarget("b", "1==1", "inputs", "outputs", "returns", "keepDuplicateOutputs", "dependsOnTargets", "beforeTargets", "afterTargets", true);
Instance\ProjectTargetInstance_Internal_Tests.cs (3)
77var original = CreateTarget(null, children, errorChildren); 80var copy = ProjectTargetInstance.FactoryForDeserialization(TranslationHelpers.GetReadTranslator());
TestComparers\ProjectInstanceModelTestComparers.cs (4)
80public class TargetComparer : IEqualityComparer<ProjectTargetInstance> 82public bool Equals(ProjectTargetInstance x, ProjectTargetInstance y) 110public int GetHashCode(ProjectTargetInstance obj)
TestData\ProjectInstanceTestObjects.cs (1)
163public static ProjectTargetInstance CreateTarget(