145 instantiations of ProjectItemInstance
Microsoft.Build (17)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (1)
459items.Add(new ProjectItemInstance(
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (4)
1395newItem = new ProjectItemInstance(_projectInstance, outputTargetName, outputAsProjectItem.IncludeEscaped, parameterLocationEscaped); 1404newItem = new ProjectItemInstance(_projectInstance, outputTargetName, outputAsITaskItem2.EvaluatedIncludeEscaped, parameterLocationEscaped); 1413newItem = new ProjectItemInstance(_projectInstance, outputTargetName, EscapingUtilities.Escape(output.ItemSpec), parameterLocationEscaped); 1521_batchBucket.Lookup.AddNewItem(new ProjectItemInstance(_projectInstance, outputTargetName, EscapingUtilities.Escape(output), EscapingUtilities.Escape(parameterLocation.File)));
Graph\GraphBuilder.cs (2)
159new ProjectItemInstance( 235var stubItem = new ProjectItemInstance(
Instance\ProjectInstance.cs (4)
1953ProjectItemInstance item = new ProjectItemInstance(this, itemType, evaluatedInclude, this.FullPath); 1976ProjectItemInstance item = new ProjectItemInstance(this, itemType, evaluatedInclude, metadata, this.FullPath); 3353var instance = new ProjectItemInstance( 3412ProjectItemInstance instance = new ProjectItemInstance(
Instance\ProjectItemInstance.cs (6)
622ProjectItemInstance newItem = new ProjectItemInstance(projectInstance); 660return new ProjectItemInstance(this); 669return new ProjectItemInstance(this, newProject); 2020ProjectItemInstance item = new ProjectItemInstance(_project, ItemType, include, definingProject); 2053return new ProjectItemInstance(_project, ItemType, evaluatedInclude, evaluatedIncludeBeforeWildcardExpansion, definingProject); 2103return new ProjectItemInstance(_project, ItemType, includeEscaped, includeBeforeWildcardExpansionEscaped, source._taskItem._directMetadata, itemDefinitionsClone, definingProject, useItemDefinitionsWithoutModification: false);
Microsoft.Build.Engine.UnitTests (128)
BackEnd\BatchingEngine_Tests.cs (16)
37items.Add(new ProjectItemInstance(project, "File", "a.foo", project.FullPath)); 38items.Add(new ProjectItemInstance(project, "File", "b.foo", project.FullPath)); 39items.Add(new ProjectItemInstance(project, "File", "c.foo", project.FullPath)); 40items.Add(new ProjectItemInstance(project, "File", "d.foo", project.FullPath)); 41items.Add(new ProjectItemInstance(project, "File", "e.foo", project.FullPath)); 45items.Add(new ProjectItemInstance(project, "Doc", "a.doc", project.FullPath)); 46items.Add(new ProjectItemInstance(project, "Doc", "b.doc", project.FullPath)); 47items.Add(new ProjectItemInstance(project, "Doc", "c.doc", project.FullPath)); 48items.Add(new ProjectItemInstance(project, "Doc", "d.doc", project.FullPath)); 49items.Add(new ProjectItemInstance(project, "Doc", "e.doc", project.FullPath)); 135ProjectItemInstance a = new ProjectItemInstance(project, "File", "a.foo", project.FullPath); 136ProjectItemInstance b = new ProjectItemInstance(project, "File", "b.foo", project.FullPath); 172ProjectItemInstance a = new ProjectItemInstance(project, "File", "a.foo", project.FullPath); 174ProjectItemInstance b = new ProjectItemInstance(project, "File", "b.foo", project.FullPath); 232items.Add(new ProjectItemInstance(project, "File", "a.foo", project.FullPath)); 233items.Add(new ProjectItemInstance(project, "File", "b.foo", project.FullPath)); // Need at least two items for this test case to ensure multiple buckets might be possible
BackEnd\IntrinsicTask_Tests.cs (4)
3926ProjectItemInstance item1 = new ProjectItemInstance(project, "i0", "a1", project.FullPath); 3927ProjectItemInstance item2 = new ProjectItemInstance(project, "i0", "a2", project.FullPath); 3928ProjectItemInstance item3 = new ProjectItemInstance(project, "i0", "a3", project.FullPath); 3929ProjectItemInstance item4 = new ProjectItemInstance(project, "i0", "a4", project.FullPath);
BackEnd\Lookup_Tests.cs (38)
29table1.Add(new ProjectItemInstance(project, "i1", "a1", project.FullPath)); 30table1.Add(new ProjectItemInstance(project, "i2", "a%3b1", project.FullPath)); 34lookup.PopulateWithItem(new ProjectItemInstance(project, "i1", "a2", project.FullPath)); 35lookup.PopulateWithItem(new ProjectItemInstance(project, "i2", "a%282", project.FullPath)); 51table1.Add(new ProjectItemInstance(project, "i1", "a1", project.FullPath)); 52table1.Add(new ProjectItemInstance(project, "i2", "a%3b1", project.FullPath)); 84table1.Add(new ProjectItemInstance(project, "i1", "a1", project.FullPath)); 108lookup.AddNewItem(new ProjectItemInstance(project, "i1", "a2", project.FullPath)); 154table1.Add(new ProjectItemInstance(project, "i1", "a1", project.FullPath)); 157table1.Add(new ProjectItemInstance(project, "i1", "a1", project.FullPath)); 165new ProjectItemInstance(project, "i1", "a1", project.FullPath), // Should not get added 166new ProjectItemInstance(project, "i1", "a2", project.FullPath), // Should get added 206table1.Add(new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>("m1", "m1") }, project.FullPath)); 207table1.Add(new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>("m1", "m2") }, project.FullPath)); 215new ProjectItemInstance(project, "i1", "a1", project.FullPath), // Should get added 216new ProjectItemInstance(project, "i1", "a2", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should get added 217new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should not get added 218new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m3") }, project.FullPath), // Should get added 255ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a1", project.FullPath); 264ProjectItemInstance item2 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 306ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 366ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 407ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 471ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 531ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 602ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 669ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 724ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 772ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 826ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 867ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 902ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 975ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 1016lookup.AddNewItem(new ProjectItemInstance(project, "x", "y", project.FullPath)); 1030ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 1079ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 1134ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 1169ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath);
BackEnd\MockTaskBuilder.cs (2)
102lookupForInference.AddNewItem(new ProjectItemInstance(requestEntry.RequestConfiguration.Project, taskInstance.Name + "_Item", "Item", task.Location.File)); 106lookupForExecution.AddNewItem(new ProjectItemInstance(requestEntry.RequestConfiguration.Project, taskInstance.Name + "_Item", "Item", task.Location.File));
BackEnd\TargetUpToDateChecker_Tests.cs (11)
183items.Add(new ProjectItemInstance(project, "Items", "a.cs", project.FullPath)); 184items.Add(new ProjectItemInstance(project, "Items", "b.cs", project.FullPath)); 225items.Add(new ProjectItemInstance(project, "Items", "a.cs", project.FullPath)); 226items.Add(new ProjectItemInstance(project, "Items", "b.cs", project.FullPath)); 227items.Add(new ProjectItemInstance(project, "Items", "c.cs", project.FullPath)); 272items.Add(new ProjectItemInstance(project, "Items", "a.cs", project.FullPath)); 273items.Add(new ProjectItemInstance(project, "Items", "b.cs", project.FullPath)); 274items.Add(new ProjectItemInstance(project, "Items", "c.cs", project.FullPath)); 275items.Add(new ProjectItemInstance(project, "MoreItems", "a.txt", project.FullPath)); 276items.Add(new ProjectItemInstance(project, "MoreItems", "b.txt", project.FullPath)); 277items.Add(new ProjectItemInstance(project, "MoreItems", "c.txt", project.FullPath));
BackEnd\TaskExecutionHost_Tests.cs (3)
1273ProjectItemInstance item = new ProjectItemInstance(project, "ItemListContainingOneItem", "a.cs", "."); 1278item = new ProjectItemInstance(project, "ItemListContainingTwoItems", "b.cs", "."); 1279ProjectItemInstance item2 = new ProjectItemInstance(project, "ItemListContainingTwoItems", "c.cs", ".");
BackEnd\TaskRegistry_Tests.cs (6)
2215ProjectItemInstance iag = new ProjectItemInstance(project, "IntermediateAssembly", @"subdir1\engine.dll", project.FullPath); 2219iag = new ProjectItemInstance(project, "IntermediateAssembly", @"subdir2\tasks.dll", project.FullPath); 2226ProjectItemInstance fig = new ProjectItemInstance(project, "FirstItem" + i, "FirstValue" + i, project.FullPath); 2233ProjectItemInstance sig = new ProjectItemInstance(project, "SecondItem" + i, "SecondValue" + i, project.FullPath); 2238ProjectItemInstance tig = new ProjectItemInstance(project, "ThirdItem", "ThirdValue1", project.FullPath); 2242ProjectItemInstance trig = new ProjectItemInstance(project, "ItemWithTrueItem", "true", project.FullPath);
Evaluation\Expander_Tests.cs (19)
86ig.Add(new ProjectItemInstance(project, "Compile", "foo.cs", project.FullPath)); 87ig.Add(new ProjectItemInstance(project, "Compile", "bar.cs", project.FullPath)); 90ig2.Add(new ProjectItemInstance(project, "Resource", "bing.resx", project.FullPath)); 758ProjectItemInstance pi = new ProjectItemInstance(project, "i", "i" + n.ToString(), project.FullPath); 802ProjectItemInstance i0 = new ProjectItemInstance(project, "i", "i0", project.FullPath); 803ProjectItemInstance i1 = new ProjectItemInstance(project, "i", "i1", project.FullPath); 1369ProjectItemInstance i1 = new ProjectItemInstance(project, "IntermediateAssembly", 1373ProjectItemInstance i2 = new ProjectItemInstance(project, "IntermediateAssembly", 1379ProjectItemInstance i3 = new ProjectItemInstance(project, "Content", "splash.bmp", project.FullPath); 1384ProjectItemInstance i4 = new ProjectItemInstance(project, "Resource", "string$(p).resx", project.FullPath); 1387ProjectItemInstance i5 = new ProjectItemInstance(project, "Resource", "dialogs%253b.resx", project.FullPath); 1392ProjectItemInstance i6 = new ProjectItemInstance(project, "Content", "about.bmp", project.FullPath); 1583var item = new ProjectItemInstance(project, "ManyItems", $"ThisIsAFairlyLongFileName_{i}.bmp", project.FullPath); 1591new ProjectItemInstance (project, "ManySpacesItem", "Foo", project.FullPath), 1592new ProjectItemInstance (project, "ManySpacesItem", manySpaces, project.FullPath), 1593new ProjectItemInstance (project, "ManySpacesItem", "Bar", project.FullPath), 1597new ProjectItemInstance (project, "Exactly1024", "".PadLeft(1024), project.FullPath), 1598new ProjectItemInstance (project, "Exactly1024", "Foo", project.FullPath), 3917ig.Add(new ProjectItemInstance(project, "Compile", "fOo.Cs", project.FullPath));
Evaluation\ItemSpec_Tests.cs (1)
109itemDictionary.Add(new ProjectItemInstance(dummyProject, itemType.Key, item, dummyProject.FullPath));
ExpressionTree_Tests.cs (17)
185itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "foo.cs", parentProject.FullPath)); 186itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "bar.cs", parentProject.FullPath)); 187itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "baz.cs", parentProject.FullPath)); 188itemBag.Add(new ProjectItemInstance(parentProject, "Boolean", "true", parentProject.FullPath)); 215itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "foo.cs", parentProject.FullPath)); 216itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "bar.cs", parentProject.FullPath)); 217itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "baz.cs", parentProject.FullPath)); 250itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "foo.cs", parentProject.FullPath)); 251itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "bar.cs", parentProject.FullPath)); 252itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "baz.cs", parentProject.FullPath)); 282itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "a", parentProject.FullPath)); 299itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "foo.cs", parentProject.FullPath)); 300itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "bar.cs", parentProject.FullPath)); 301itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "baz.cs", parentProject.FullPath)); 328itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "foo.cs", parentProject.FullPath)); 329itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "bar.cs", parentProject.FullPath)); 330itemBag.Add(new ProjectItemInstance(parentProject, "Compile", "baz.cs", parentProject.FullPath));
ExpressionTreeExpression_Tests.cs (7)
376itemBag.Add(new ProjectItemInstance(parentProject, "u", "a'b;c", parentProject.FullPath)); 377itemBag.Add(new ProjectItemInstance(parentProject, "v", "a", parentProject.FullPath)); 378itemBag.Add(new ProjectItemInstance(parentProject, "w", "1", parentProject.FullPath)); 379itemBag.Add(new ProjectItemInstance(parentProject, "x", "true", parentProject.FullPath)); 380itemBag.Add(new ProjectItemInstance(parentProject, "y", "xxx", parentProject.FullPath)); 381itemBag.Add(new ProjectItemInstance(parentProject, "z", "xxx", parentProject.FullPath)); 382itemBag.Add(new ProjectItemInstance(parentProject, "z", "yyy", parentProject.FullPath));
Graph\ProjectGraph_Tests.cs (4)
137var referenceItem1 = new ProjectItemInstance(projectInstance, "Ref1", "path1", "file1"); 140var referenceItem2 = new ProjectItemInstance(projectInstance, "Ref2", "path2", "file2"); 184var referenceItem1 = new ProjectItemInstance(projectInstance, "Ref1", "path1", "file1"); 185var referenceItem2 = new ProjectItemInstance(projectInstance, "Ref2", "path1", "file1");
1117 references to ProjectItemInstance
Microsoft.Build (368)
BackEnd\Components\Communications\LogMessagePacket.cs (1)
8using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\Components\Logging\ILoggingService.cs (1)
13using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (1)
15using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\Components\Logging\ProjectLoggingContext.cs (4)
13using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem; 124IItemDictionary<ProjectItemInstance> projectItems, 160IItemDictionary<ProjectItemInstance> projectItems, 191IItemDictionary<ProjectItemInstance> projectItems,
BackEnd\Components\Logging\TargetLoggingContext.cs (1)
10using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\Components\ProjectCache\CacheResult.cs (2)
131private static ProjectItemInstance.TaskItem CreateTaskItem(ITaskItem2 taskItemInterface) 133var taskItem = new ProjectItemInstance.TaskItem(taskItemInterface.EvaluatedIncludeEscaped, definingFileEscaped: null);
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
178ICollection<ProjectItemInstance> items = projectInstance.GetItems(ItemTypeNames.ProjectCachePlugin); 179foreach (ProjectItemInstance item in items)
BackEnd\Components\RequestBuilder\BatchingEngine.cs (10)
147Dictionary<string, ICollection<ProjectItemInstance>> itemListsToBeBatched = GetItemListsToBeBatched(consumedMetadataReferences, consumedItemReferences, lookup, elementLocation); 206private static Dictionary<string, ICollection<ProjectItemInstance>> GetItemListsToBeBatched( 215var itemListsToBeBatched = new Dictionary<string, ICollection<ProjectItemInstance>>(MSBuildNameIgnoreCaseComparer.Default); 257ICollection<ProjectItemInstance> items = lookup.GetItems(consumedItemName); 262foreach (ProjectItemInstance item in items) 302Dictionary<string, ICollection<ProjectItemInstance>> itemListsToBeBatched, 313foreach (KeyValuePair<string, ICollection<ProjectItemInstance>> entry in itemListsToBeBatched) 318ICollection<ProjectItemInstance> items = entry.Value ?? lookup.GetItems(itemName); 322foreach (ProjectItemInstance item in items) 388ProjectItemInstance item,
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (27)
18using ProjectItemInstanceFactory = Microsoft.Build.Execution.ProjectItemInstance.TaskItem.ProjectItemInstanceFactory; 168List<ProjectItemInstance> itemsToAdd = ExpandItemIntoItems(child, bucket.Expander, keepMetadata, removeMetadata, loggingContext); 203ProjectItemInstance.SetMetadata(metadataTable.AddedMetadata, itemsToAdd); // Add in one operation for potential copy-on-write 252ICollection<ProjectItemInstance> group = bucket.Lookup.GetItems(child.ItemType); 259List<ProjectItemInstance> itemsToRemove; 299ICollection<ProjectItemInstance> group = bucket.Lookup.GetItems(child.ItemType); 382private List<ProjectItemInstance> ExpandItemIntoItems( 384Expander<ProjectPropertyInstance, ProjectItemInstance> expander, 391List<ProjectItemInstance> items = new List<ProjectItemInstance>(); 429IList<ProjectItemInstance> itemsFromSplit = expander.ExpandSingleItemVectorExpressionIntoItems( 487foreach (var item in items) 498foreach (var item in items) 546private List<ProjectItemInstance> FindItemsMatchingSpecification( 547ICollection<ProjectItemInstance> items, 550Expander<ProjectPropertyInstance, ProjectItemInstance> expander) 596List<ProjectItemInstance> itemsRemoved = new List<ProjectItemInstance>(); 598foreach (ProjectItemInstance item in items) 614private List<ProjectItemInstance> FindItemsMatchingMetadataSpecification( 615ICollection<ProjectItemInstance> group, 617Expander<ProjectPropertyInstance, ProjectItemInstance> expander, 621ItemSpec<ProjectPropertyInstance, ProjectItemInstance> itemSpec = new ItemSpec<ProjectPropertyInstance, ProjectItemInstance>(child.Remove, expander, child.RemoveLocation, Project.Directory, true); 623itemSpec.Fragments.All(f => f is ItemSpec<ProjectPropertyInstance, ProjectItemInstance>.ItemExpressionFragment), 628MetadataTrie<ProjectPropertyInstance, ProjectItemInstance> metadataSet = new MetadataTrie<ProjectPropertyInstance, ProjectItemInstance>(matchingOptions, matchOnMetadata, itemSpec);
BackEnd\Components\RequestBuilder\ItemBucket.cs (5)
31private Expander<ProjectPropertyInstance, ProjectItemInstance> _expander; 97_lookup.PopulateWithItems(name, new List<ProjectItemInstance>()); 112_expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(_lookup, _lookup, new StringMetadataTable(_metadata), FileSystems.Default, loggingContext); 157internal Expander<ProjectPropertyInstance, ProjectItemInstance> Expander 200internal void AddItem(ProjectItemInstance item)
BackEnd\Components\RequestBuilder\Lookup.cs (90)
19using ItemsMetadataUpdateDictionary = System.Collections.Generic.Dictionary<Microsoft.Build.Execution.ProjectItemInstance, Microsoft.Build.BackEnd.Lookup.MetadataModifications>; 20using ItemTypeToItemsMetadataUpdateDictionary = System.Collections.Generic.Dictionary<string, System.Collections.Generic.Dictionary<Microsoft.Build.Execution.ProjectItemInstance, Microsoft.Build.BackEnd.Lookup.MetadataModifications>>; 57internal class Lookup : IPropertyProvider<ProjectPropertyInstance>, IItemProvider<ProjectItemInstance> 83private Dictionary<ProjectItemInstance, ProjectItemInstance> _cloneTable; 92internal Lookup(IItemDictionary<ProjectItemInstance> projectItems, PropertyDictionary<ProjectPropertyInstance> properties) 124private IItemDictionary<ProjectItemInstance> PrimaryTable 130private ItemDictionary<ProjectItemInstance> PrimaryAddTable 136private ItemDictionary<ProjectItemInstance> PrimaryRemoveTable 154private IItemDictionary<ProjectItemInstance> SecondaryTable 160private ItemDictionary<ProjectItemInstance> SecondaryAddTable 166private ItemDictionary<ProjectItemInstance> SecondaryRemoveTable 321foreach (ProjectItemInstance item in PrimaryRemoveTable) 340foreach (KeyValuePair<string, Dictionary<ProjectItemInstance, MetadataModifications>> entry in PrimaryModifyTable) 342Dictionary<ProjectItemInstance, MetadataModifications> modifiesOfType; 346foreach (KeyValuePair<ProjectItemInstance, MetadataModifications> modify in entry.Value) 383SecondaryTable ??= new ItemDictionary<ProjectItemInstance>(); 389SecondaryTable ??= new ItemDictionary<ProjectItemInstance>(); 395foreach (KeyValuePair<string, Dictionary<ProjectItemInstance, MetadataModifications>> entry in PrimaryModifyTable) 397SecondaryTable ??= new ItemDictionary<ProjectItemInstance>(); 465public ICollection<ProjectItemInstance> GetItems(string itemType) 471List<ProjectItemInstance> allAdds = null; 472List<ProjectItemInstance> allRemoves = null; 473Dictionary<ProjectItemInstance, MetadataModifications> allModifies = null; 474ICollection<ProjectItemInstance> groupFound = null; 481ICollection<ProjectItemInstance> adds = scope.Adds[itemType]; 484allAdds ??= new List<ProjectItemInstance>(adds.Count); 492ICollection<ProjectItemInstance> removes = scope.Removes[itemType]; 495allRemoves ??= new List<ProjectItemInstance>(removes.Count); 503Dictionary<ProjectItemInstance, MetadataModifications> modifies; 508allModifies ??= new Dictionary<ProjectItemInstance, MetadataModifications>(modifies.Count); 511foreach (KeyValuePair<ProjectItemInstance, MetadataModifications> modify in modifies) 543groupFound ??= Array.Empty<ProjectItemInstance>(); 562ItemDictionary<ProjectItemInstance> result = new ItemDictionary<ProjectItemInstance>(itemsTypesCount, itemsCount); 598internal void PopulateWithItems(string itemType, ICollection<ProjectItemInstance> group) 600PrimaryTable ??= new ItemDictionary<ProjectItemInstance>(); 601ICollection<ProjectItemInstance> existing = PrimaryTable[itemType]; 618internal void PopulateWithItem(ProjectItemInstance item) 620PrimaryTable ??= new ItemDictionary<ProjectItemInstance>(); 640internal void AddNewItemsOfItemType(string itemType, ICollection<ProjectItemInstance> group, bool doNotAddDuplicates = false, Action<IList> logFunction = null) 646foreach (ProjectItemInstance item in group) 658PrimaryAddTable ??= new ItemDictionary<ProjectItemInstance>(); 659IEnumerable<ProjectItemInstance> itemsToAdd = group; 664var existingItemsHashSet = existingItems.ToHashSet(ProjectItemInstance.EqualityComparer); 666var deduplicatedItemsToAdd = new List<ProjectItemInstance>(); 667foreach (var item in itemsToAdd) 682logFunction.Invoke(itemsToAdd as List<ProjectItemInstance>); 686var groupAsList = group as List<ProjectItemInstance>; 697internal void AddNewItem(ProjectItemInstance item) 709PrimaryAddTable ??= new ItemDictionary<ProjectItemInstance>(); 716internal void RemoveItems(IEnumerable<ProjectItemInstance> items) 718foreach (ProjectItemInstance item in items) 727internal void RemoveItem(ProjectItemInstance item) 735PrimaryRemoveTable ??= new ItemDictionary<ProjectItemInstance>(); 747internal void ModifyItems(string itemType, ICollection<ProjectItemInstance> group, MetadataModifications metadataChanges) 760foreach (ProjectItemInstance item in group) 762ProjectItemInstance actualItem = RetrieveOriginalFromCloneTable(item); 779Dictionary<ProjectItemInstance, MetadataModifications> modifiesOfType; 782modifiesOfType = new Dictionary<ProjectItemInstance, MetadataModifications>(); 786foreach (ProjectItemInstance item in group) 794ProjectItemInstance actualItem = RetrieveOriginalFromCloneTable(item); 795var modify = new KeyValuePair<ProjectItemInstance, MetadataModifications>(actualItem, metadataChangeCopy); 808private void ApplyModifies(ItemDictionary<ProjectItemInstance> result, Dictionary<ProjectItemInstance, MetadataModifications> allModifies) 815_cloneTable ??= new Dictionary<ProjectItemInstance, ProjectItemInstance>(); 819ProjectItemInstance originalItem = modify.Key; 826ProjectItemInstance cloneItem = modify.Key.DeepClone(); 842private static void ApplyMetadataModificationsToItem(MetadataModifications modificationsToApply, ProjectItemInstance itemToModify) 874private ProjectItemInstance RetrieveOriginalFromCloneTable(ProjectItemInstance item) 876ProjectItemInstance original; 892private void ApplyModificationsToTable(IItemDictionary<ProjectItemInstance> table, string itemType, ItemsMetadataUpdateDictionary modify) 894ICollection<ProjectItemInstance> existing = table[itemType]; 901var itemToModify = kvPair.Key; 915private void MergeModificationsIntoModificationTable(Dictionary<ProjectItemInstance, MetadataModifications> modifiesOfType, 916KeyValuePair<ProjectItemInstance, MetadataModifications> modify, 953private void MustNotBeInTable(ItemDictionary<ProjectItemInstance> table, ProjectItemInstance item) 957ICollection<ProjectItemInstance> tableOfItemsOfSameType = table[item.ItemType]; 968private void MustNotBeInTable(ItemTypeToItemsMetadataUpdateDictionary table, ProjectItemInstance item) 983private void MustNotBeInAnyTables(ProjectItemInstance item) 1317private IItemDictionary<ProjectItemInstance> _items; 1322private ItemDictionary<ProjectItemInstance> _adds; 1327private ItemDictionary<ProjectItemInstance> _removes; 1366internal Scope(Lookup lookup, string description, IItemDictionary<ProjectItemInstance> items, PropertyDictionary<ProjectPropertyInstance> properties) 1386internal IItemDictionary<ProjectItemInstance> Items 1394internal ItemDictionary<ProjectItemInstance> Adds 1402internal ItemDictionary<ProjectItemInstance> Removes
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
18using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\Components\RequestBuilder\TargetEntry.cs (5)
22using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem; 119private Expander<ProjectPropertyInstance, ProjectItemInstance> _expander; 189_expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(baseLookup, baseLookup, FileSystems.Default, loggingContext); 474ItemDictionary<ProjectItemInstance> changedTargetInputs; 475ItemDictionary<ProjectItemInstance> upToDateTargetInputs;
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (22)
16using ProjectItemInstanceFactory = Microsoft.Build.Execution.ProjectItemInstance.TaskItem.ProjectItemInstanceFactory; 23using ItemVectorPartition = System.Collections.Generic.Dictionary<string, System.Collections.Generic.IList<Microsoft.Build.Execution.ProjectItemInstance>>; 31using ItemVectorPartitionCollection = System.Collections.Generic.Dictionary<string, System.Collections.Generic.Dictionary<string, System.Collections.Generic.IList<Microsoft.Build.Execution.ProjectItemInstance>>>; 134out ItemDictionary<ProjectItemInstance> changedTargetInputs, 135out ItemDictionary<ProjectItemInstance> upToDateTargetInputs) 592out ItemDictionary<ProjectItemInstance> changedTargetInputs, 593out ItemDictionary<ProjectItemInstance> upToDateTargetInputs) 597changedTargetInputs = new ItemDictionary<ProjectItemInstance>(); 598upToDateTargetInputs = new ItemDictionary<ProjectItemInstance>(); 614foreach (IList<ProjectItemInstance> inputItems in inputItemVectors.Values) 621List<ProjectItemInstance> upToDateInputItems = new List<ProjectItemInstance>(inputItems); 626foreach (KeyValuePair<string, IList<ProjectItemInstance>> outputEntry in outputItemVectors) 628IList<ProjectItemInstance> outputItems = outputEntry.Value; 686foreach (ProjectItemInstance item in upToDateInputItems) 817IList<ProjectItemInstance> itemVectorContents = bucket.Expander.ExpandSingleItemVectorExpressionIntoItems(item, itemFactory, ExpanderOptions.ExpandItems, true /* include null entries from transforms */, out bool isTransformExpression, elementLocation); 905foreach (IList<ProjectItemInstance> items in itemVectorPartition.Values) 907foreach (ProjectItemInstance item in items) 966ErrorUtilities.VerifyThrow(inputs[0] is string || inputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance"); 971ErrorUtilities.VerifyThrow(outputs[0] is string || outputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance"); 1086ErrorUtilities.VerifyThrow(inputs[0] is string || inputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance"); 1091ErrorUtilities.VerifyThrow(outputs[0] is string || outputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance");
BackEnd\Components\RequestBuilder\TaskBuilder.cs (4)
26using ProjectItemInstanceFactory = Microsoft.Build.Execution.ProjectItemInstance.TaskItem.ProjectItemInstanceFactory; 520private IDictionary<string, string> GatherTaskIdentityParameters(Expander<ProjectPropertyInstance, ProjectItemInstance> expander) 1032foreach (var projectReferenceItem in projectReferenceItems) 1195ICollection<ProjectItemInstance> items = bucket.Expander.ExpandIntoItemsLeaveEscaped(outputItemSpec, itemFactory, ExpanderOptions.ExpandItems, taskItemInstance.TaskParameterLocation);
BackEnd\Components\RequestBuilder\TaskHost.cs (1)
25using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\Shared\TargetResult.cs (1)
13using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (2)
25using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem; 1386ProjectItemInstance newItem;
Construction\Solution\SolutionProjectGenerator.cs (1)
1057ProjectItemInstance item;
Definition\Toolset.cs (3)
191private Expander<ProjectPropertyInstance, ProjectItemInstance> _expander; 964_expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, FileSystems.Default, loggingContext); 1038TaskRegistry.InitializeTaskRegistryFromUsingTaskElements<ProjectPropertyInstance, ProjectItemInstance>(
Definition\ToolsetReader.cs (5)
452Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(initialProperties, FileSystems.Default); 521private void EvaluateAndSetProperty(ToolsetPropertyDefinition property, PropertyDictionary<ProjectPropertyInstance> properties, PropertyDictionary<ProjectPropertyInstance> globalProperties, PropertyDictionary<ProjectPropertyInstance> initialProperties, bool accumulateProperties, ref string toolsPath, ref string binPath, ref Expander<ProjectPropertyInstance, ProjectItemInstance> expander) 570expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(initialProperties, FileSystems.Default); 578private string ExpandPropertyUnescaped(ToolsetPropertyDefinition property, Expander<ProjectPropertyInstance, ProjectItemInstance> expander)
Evaluation\Conditionals\FunctionCallExpressionNode.cs (1)
10using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
Evaluation\ConditionEvaluator.cs (1)
15using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
Evaluation\Expander.cs (2)
27using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem; 28using TaskItemFactory = Microsoft.Build.Execution.ProjectItemInstance.TaskItem.TaskItemFactory;
Graph\GraphBuilder.cs (11)
235var stubItem = new ProjectItemInstance( 647private ConcurrentDictionary<(ProjectGraphNode, ProjectGraphNode), ProjectItemInstance> ReferenceItems = 648new ConcurrentDictionary<(ProjectGraphNode, ProjectGraphNode), ProjectItemInstance>(); 652public ProjectItemInstance this[(ProjectGraphNode node, ProjectGraphNode reference) key] 656ErrorUtilities.VerifyThrow(ReferenceItems.TryGetValue(key, out ProjectItemInstance referenceItem), "All requested keys should exist"); 661public void AddOrUpdateEdge((ProjectGraphNode node, ProjectGraphNode reference) key, ProjectItemInstance edge) 665addValueFactory: static ((ProjectGraphNode node, ProjectGraphNode reference) key, ProjectItemInstance referenceItem) => referenceItem, 666updateValueFactory: static ((ProjectGraphNode node, ProjectGraphNode reference) key, ProjectItemInstance existingItem, ProjectItemInstance newItem) => 680ProjectItemInstance mergedItem = existingItem.DeepClone(); 704internal IReadOnlyDictionary<(ConfigurationMetadata, ConfigurationMetadata), ProjectItemInstance> TestOnly_AsConfigurationMetadata()
Graph\ProjectGraph.cs (1)
800private static ImmutableList<string> ExpandDefaultTargets(ImmutableList<string> targets, List<string> defaultTargets, ProjectItemInstance graphEdge)
Graph\ProjectGraphNode.cs (1)
59internal void AddProjectReference(ProjectGraphNode reference, ProjectItemInstance projectReferenceItem, GraphBuilder.GraphEdges edges)
Graph\ProjectInterpretation.cs (10)
56internal readonly record struct ReferenceInfo(ConfigurationMetadata ReferenceConfiguration, ProjectItemInstance ProjectReferenceItem); 79IEnumerable<ProjectItemInstance> projectReferenceItems; 108foreach (ProjectItemInstance projectReferenceItem in projectReferenceItems) 262ProjectItemInstance newInnerBuildEdge = graphBuilder.Edges[(outerBuildReferencingProject, outerBuild)]; 283private static IEnumerable<ProjectItemInstance> ConstructInnerBuildReferences(ProjectInstance outerBuild) 310ProjectItemInstance projectReference) 370private delegate GlobalPropertyPartsForMSBuildTask GlobalPropertiesModifier(GlobalPropertyPartsForMSBuildTask defaultParts, ProjectItemInstance projectReference); 380ProjectItemInstance projectReference, 497ICollection<ProjectItemInstance> projectReferenceTargets = project.GetItems(ItemTypeNames.ProjectReferenceTargets); 501foreach (ProjectItemInstance projectReferenceTarget in projectReferenceTargets)
Instance\ProjectInstance.cs (110)
32using ProjectItemInstanceFactory = Microsoft.Build.Execution.ProjectItemInstance.TaskItem.ProjectItemInstanceFactory; 77public class ProjectInstance : IPropertyProvider<ProjectPropertyInstance>, IItemProvider<ProjectItemInstance>, IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>, ITranslatable 131private IItemDictionary<ProjectItemInstance> _items; 136private IMultiDictionary<string, ProjectItemInstance> _itemsByEvaluatedInclude; 450_itemsByEvaluatedInclude = new ImmutableLinkedMultiDictionaryConverter<string, ProjectItem, ProjectItemInstance>( 540_items = new ItemDictionary<ProjectItemInstance>(); // We don't want any of the items. That would include things like ProjectReferences, which would just pollute our own. 560IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance> thisAsIEvaluatorData = this; 718_items = new ItemDictionary<ProjectItemInstance>(that._items.Count); 720foreach (ProjectItemInstance item in that.Items) 742((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, 744((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, 746((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, 748((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, 811_items = new ItemDictionary<ProjectItemInstance>(that.Items.Count); 815foreach (var actualItem in that.GetItems(itemFilter.Key)) 817var filteredItem = actualItem.DeepClone(this); 919private static ImmutableItemDictionary<ProjectItem, ProjectItemInstance> GetImmutableItemsDictionaryFromImmutableProject( 929Func<ProjectItem, ProjectItemInstance> convertCachedItemToInstance = 932var itemDictionary = new ImmutableItemDictionary<ProjectItem, ProjectItemInstance>( 941private static ProjectItemInstance ConvertCachedProjectItemToInstance( 946ProjectItemInstance result = null; 947if (projectItem is IImmutableInstanceProvider<ProjectItemInstance> instanceProvider) 952var newInstance = InstantiateProjectItemInstanceFromImmutableProjectSource( 1114bool IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.CanEvaluateElementsWithFalseConditions => false; 1134public ICollection<ProjectItemInstance> Items 1140(ICollection<ProjectItemInstance>)ReadOnlyEmptyCollection<ProjectItemInstance>.Instance : 1141new ReadOnlyCollection<ProjectItemInstance>(_items); 1281TaskRegistry IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.TaskRegistry 1298Toolset IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.Toolset 1309string IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.SubToolsetVersion 1323string IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.ExplicitToolsVersion 1333PropertyDictionary<ProjectPropertyInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.GlobalPropertiesDictionary 1340PropertyDictionary<ProjectPropertyInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.EnvironmentVariablePropertiesDictionary 1348ISet<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.GlobalPropertiesToTreatAsLocal 1364PropertyDictionary<ProjectPropertyInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.Properties 1374IEnumerable<ProjectItemDefinitionInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.ItemDefinitionsEnumerable 1384IItemDictionary<ProjectItemInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.Items 1395List<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.InitialTargets 1413List<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.DefaultTargets 1431IDictionary<string, List<TargetSpecification>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.BeforeTargets 1441IDictionary<string, List<TargetSpecification>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AfterTargets 1454Dictionary<string, List<string>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.ConditionedProperties 1468bool IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.ShouldEvaluateForDesignTime 1566internal IItemDictionary<ProjectItemInstance> ItemsToBuildWith 1610public static string GetEvaluatedItemIncludeEscaped(ProjectItemInstance item) 1641public static string GetMetadataValueEscaped(ProjectItemInstance item, string name) 1676ICollection<ProjectItemInstance> IItemProvider<ProjectItemInstance>.GetItems(string itemType) 1685void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>. 1695void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.FinishEvaluation() 1705void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddItem(ProjectItemInstance item) 1716void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddItemIgnoringCondition(ProjectItemInstance item) 1725IItemDefinition<ProjectMetadataInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddItemDefinition(string itemType) 1743void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddToAllEvaluatedPropertiesList(ProjectPropertyInstance property) 1757void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddToAllEvaluatedItemDefinitionMetadataList(ProjectMetadataInstance itemDefinitionMetadatum) 1771void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddToAllEvaluatedItemsList(ProjectItemInstance item) 1779IItemDefinition<ProjectMetadataInstance> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.GetItemDefinition(string itemType) 1794ProjectPropertyInstance IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.SetProperty(string name, string evaluatedValueEscaped, bool isGlobalProperty, bool mayBeReserved, LoggingContext loggingContext, bool isEnvironmentVariable) 1807ProjectPropertyInstance IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.SetProperty(ProjectPropertyElement propertyElement, string evaluatedValueEscaped, LoggingContext loggingContext) 1818ProjectTargetInstance IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.GetTarget(string targetName) 1831void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.AddTarget(ProjectTargetInstance target) 1839void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.RecordImport( 1846((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).RecordImportWithDuplicates(importElement, import, versionEvaluated); 1852void IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.RecordImportWithDuplicates(ProjectImportElement importElement, ProjectRootElement import, int versionEvaluated) 1949public ProjectItemInstance AddItem(string itemType, string evaluatedInclude) 1953ProjectItemInstance item = new ProjectItemInstance(this, itemType, evaluatedInclude, this.FullPath); 1972public ProjectItemInstance AddItem(string itemType, string evaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) 1976ProjectItemInstance item = new ProjectItemInstance(this, itemType, evaluatedInclude, metadata, this.FullPath); 1987public ICollection<ProjectItemInstance> GetItems(string itemType) 1990return ((IItemProvider<ProjectItemInstance>)this).GetItems(itemType); 1996public IEnumerable<ProjectItemInstance> GetItemsByItemTypeAndEvaluatedInclude(string itemType, string evaluatedInclude) 2001foreach (var item in GetItems(itemType)) 2011foreach (var item in GetItemsByEvaluatedInclude(evaluatedInclude)) 2025public bool RemoveItem(ProjectItemInstance item) 2238Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(this, this, FileSystems.Default, _loggingContext); 2256Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(this, this, FileSystems.Default, _loggingContext); 2294foreach (ProjectItemInstance item in _items.GetItems(itemType)) 2335_items = new ItemDictionary<ProjectItemInstance>(projectState._items); 2491_items = new ItemDictionary<ProjectItemInstance>(typeCount); 2498ProjectItemInstance item = null; 2499translator.Translate(ref item, delegate { return ProjectItemInstance.FactoryForDeserialization(translator, this); }); 2511ICollection<ProjectItemInstance> itemList = _items[itemType]; 2514foreach (ProjectItemInstance item in itemList) 2516ProjectItemInstance temp = item; 2517translator.Translate(ref temp, delegate { return ProjectItemInstance.FactoryForDeserialization(translator, this); }); 2743if (((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).BeforeTargets.TryGetValue(target, out beforeTargetsForTarget)) 2760if (((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).AfterTargets.TryGetValue(target, out afterTargetsForTarget)) 3091_items = new ItemDictionary<ProjectItemInstance>(); 3171Evaluator<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.Evaluate( 3195private IEnumerable<ProjectItemInstance> GetItemsByEvaluatedInclude(string evaluatedInclude) 3224((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).BeforeTargets = CreateCloneDictionary(beforeTargets, StringComparer.OrdinalIgnoreCase); 3225((IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>)this).AfterTargets = CreateCloneDictionary(afterTargets, StringComparer.OrdinalIgnoreCase); 3289private void CreateEvaluatedIncludeSnapshotIfRequested(bool keepEvaluationCache, ICollection<ProjectItem> items, Dictionary<ProjectItem, ProjectItemInstance> projectItemToInstanceMap) 3296var multiDictionary = new MultiDictionary<string, ProjectItemInstance>(StringComparer.OrdinalIgnoreCase); 3308private Dictionary<ProjectItem, ProjectItemInstance> CreateItemsSnapshot(ICollection<ProjectItem> items, int itemTypeCount, bool keepEvaluationCache) 3310_items = new ItemDictionary<ProjectItemInstance>(itemTypeCount); 3312var projectItemToInstanceMap = keepEvaluationCache ? new Dictionary<ProjectItem, ProjectItemInstance>(items.Count) : null; 3316ProjectItemInstance instance = InstantiateProjectItemInstance(item); 3324private ProjectItemInstance InstantiateProjectItemInstance(ProjectItem item) 3353var instance = new ProjectItemInstance( 3378private static ProjectItemInstance InstantiateProjectItemInstanceFromImmutableProjectSource( 3412ProjectItemInstance instance = new ProjectItemInstance(
Instance\ProjectItemInstance.cs (34)
139private ProjectItemInstance(ProjectItemInstance that) 147private ProjectItemInstance(ProjectItemInstance that, ProjectInstance newProject) 345internal static IEqualityComparer<ProjectItemInstance> EqualityComparer 603internal static void SetMetadata(IEnumerable<KeyValuePair<string, string>> metadataList, IEnumerable<ProjectItemInstance> items) 611foreach (ProjectItemInstance item in items) 620internal static ProjectItemInstance FactoryForDeserialization(ITranslator translator, ProjectInstance projectInstance) 622ProjectItemInstance newItem = new ProjectItemInstance(projectInstance); 658internal ProjectItemInstance DeepClone() 667internal ProjectItemInstance DeepClone(ProjectInstance newProject) 849/// Creates a task item by copying the information from a <see cref="ProjectItemInstance"/>. 852internal TaskItem(ProjectItemInstance item) 1337Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(null, null, new BuiltInMetadataTable(null, this), FileSystems.Default); 1965internal class ProjectItemInstanceFactory : IItemFactory<ProjectItemInstance, ProjectItemInstance> 2016public ProjectItemInstance CreateItem(string include, string definingProject) 2020ProjectItemInstance item = new ProjectItemInstance(_project, ItemType, include, definingProject); 2030public ProjectItemInstance CreateItem(ProjectItemInstance source, string definingProject) 2040public ProjectItemInstance CreateItem(string includeEscaped, ProjectItemInstance source, string definingProject) 2049public ProjectItemInstance CreateItem(string evaluatedInclude, string evaluatedIncludeBeforeWildcardExpansion, string definingProject) 2059public void SetMetadata(IEnumerable<KeyValuePair<ProjectMetadataElement, string>> metadataList, IEnumerable<ProjectItemInstance> destinationItems) 2066foreach (ProjectItemInstance item in destinationItems) 2075private ProjectItemInstance CreateItem(string includeEscaped, string includeBeforeWildcardExpansionEscaped, ProjectItemInstance source, string definingProject) 2110internal class TaskItemFactory : IItemFactory<ProjectItem, TaskItem>, IItemFactory<ProjectItemInstance, TaskItem> 2189public TaskItem CreateItem(ProjectItemInstance source, string definingProject) 2199public TaskItem CreateItem(string includeEscaped, ProjectItemInstance baseItem, string definingProject) 2303internal class ProjectItemInstanceEqualityComparer : IEqualityComparer<ProjectItemInstance> 2320public static IEqualityComparer<ProjectItemInstance> Default 2331public bool Equals(ProjectItemInstance x, ProjectItemInstance y) 2341public int GetHashCode(ProjectItemInstance obj)
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
953if (items is ItemDictionary<ProjectItemInstance> itemInstanceDictionary)
ObjectModelRemoting\LinkedObjectFactory.cs (5)
241private class LinkedProjectItem : ProjectItem, ILinkableObject, IImmutableInstanceProvider<ProjectItemInstance> 243private ProjectItemInstance _immutableInstance; 251public ProjectItemInstance ImmutableInstance => _immutableInstance; 253public ProjectItemInstance GetOrSetImmutableInstance(ProjectItemInstance instance)
Utilities\Utilities.cs (2)
716if (items is ItemDictionary<ProjectItemInstance> projectItemInstanceDictionary) 747if (items is ItemDictionary<ProjectItemInstance> projectItemInstanceDictionary)
Microsoft.Build.Engine.OM.UnitTests (61)
Definition\ProjectItemDefinition_Tests.cs (2)
459ProjectItemInstance item1 = instance.GetItems("i").ElementAt(0); 462ProjectItemInstance item2 = instance.GetItems("i").ElementAt(1);
Instance\ProjectInstance_Tests.cs (14)
66IList<ProjectItemInstance> items = Helpers.MakeList(p.GetItems("i")); 86ProjectItemInstance returned = p.AddItem("i", "i1"); 92foreach (ProjectItemInstance item in p.Items) 107ProjectItemInstance returned = p.AddItem("i", "i%3b1"); 113foreach (ProjectItemInstance item in p.Items) 133ProjectItemInstance returned = p.AddItem("i", "i1", metadata); 137foreach (ProjectItemInstance item in p.Items) 192ProjectItemInstance item = p.AddItem("i", "i1", null); 429var projBInstanceItem = projBInstance.GetItemsByItemTypeAndEvaluatedInclude("Compile", "bItem.cs").Single(); 430var projAInstanceItem = projBInstance.GetItemsByItemTypeAndEvaluatedInclude("Compile", "aItem.cs").Single(); 471var projBInstanceItem = projBInstance.GetItemsByItemTypeAndEvaluatedInclude("Compile", "bItem.cs").Single(); 472var projAInstanceItem = projBInstance.GetItemsByItemTypeAndEvaluatedInclude("Compile", "aItem.cs").Single(); 513var projAInstanceItem = projBInstance.GetItemsByItemTypeAndEvaluatedInclude("Compile", "aItem.cs").Single(); 514var projBInstanceItem = projBInstance.GetItemsByItemTypeAndEvaluatedInclude("CompileB", "aItem.cs").Single();
Instance\ProjectItemInstance_Tests.cs (44)
81ProjectItemInstance item = GetItemInstance(); 94ProjectItemInstance item = GetItemInstance(); 112ProjectItemInstance item = GetItemInstance(); 132ProjectItemInstance item = GetItemInstance(); 155ProjectItemInstance item = GetItemInstance(); 163ProjectItemInstance fromItem = GetItemInstance(); 216ProjectItemInstance item = GetItemInstance(); 229ProjectItemInstance item = GetItemInstance(); 241ProjectItemInstance item = GetItemInstance(); 257ProjectItemInstance item = projectInstance.AddItem("i", "i1", metadata); 267ProjectItemInstance item = GetItemInstance(); 278ProjectItemInstance item = GetItemInstance(); 290ProjectItemInstance item = GetItemInstance(); 303ProjectItemInstance item = GetItemInstance(); 315ProjectItemInstance item = GetItemInstance(); 325ProjectItemInstance item = GetItemInstance(); 349ProjectItemInstance item = projectInstance.AddItem("EscapedItem", "esca%20ped%3bitem"); 420ProjectItemInstance item = GetItemInstance(); 450ProjectItemInstance item = GetOneItem(content); 476ProjectItemInstance item = GetOneItem(content); 518ProjectItemInstance item = GetOneItem(content); 552ProjectItemInstance item = GetOneItem(content); 582IList<ProjectItemInstance> items = GetItems(content); 610IList<ProjectItemInstance> items = GetItems(content); 634ProjectItemInstance item = GetOneItem(content); 659ProjectItemInstance item = GetOneItem(content); 680ProjectItemInstance item = GetOneItem(content); 701ProjectItemInstance item = GetOneItem(content); 723ProjectItemInstance item = GetOneItem(content); 764IList<ProjectItemInstance> items = GetItems(content); 791IList<ProjectItemInstance> items = GetItems(content); 816IList<ProjectItemInstance> items = GetItems(content); 841IList<ProjectItemInstance> items = GetItems(content); 866IList<ProjectItemInstance> items = GetItems(content); 891IList<ProjectItemInstance> items = GetItems(content); 915IList<ProjectItemInstance> items = GetItems(content); 939IList<ProjectItemInstance> items = GetItems(content); 963IList<ProjectItemInstance> items = GetItems(content); 1160private static ProjectItemInstance GetOneItem(string content) 1168private static IList<ProjectItemInstance> GetItems(string content) 1180private static void AssertEvaluatedIncludes(IList<ProjectItemInstance> items, string[] includes) 1191private static ProjectItemInstance GetItemInstance() 1195ProjectItemInstance item = projectInstance.AddItem("i", "i1"); 1199private static void AssertItemHasMetadata(Dictionary<string, string> expected, ProjectItemInstance item)
Instance\ProjectMetadataInstance_Tests.cs (1)
36ProjectItemInstance item = projectInstance.AddItem("i", "i1");
Microsoft.Build.Engine.UnitTests (670)
BackEnd\BatchingEngine_Tests.cs (25)
17using ProjectItemInstanceFactory = Microsoft.Build.Execution.ProjectItemInstance.TaskItem.ProjectItemInstanceFactory; 34ItemDictionary<ProjectItemInstance> itemsByType = new ItemDictionary<ProjectItemInstance>(); 36IList<ProjectItemInstance> items = new List<ProjectItemInstance>(); 44items = new List<ProjectItemInstance>(); 131ItemDictionary<ProjectItemInstance> itemsByType = new ItemDictionary<ProjectItemInstance>(); 133List<ProjectItemInstance> items = new List<ProjectItemInstance>(); 135ProjectItemInstance a = new ProjectItemInstance(project, "File", "a.foo", project.FullPath); 136ProjectItemInstance b = new ProjectItemInstance(project, "File", "b.foo", project.FullPath); 168ItemDictionary<ProjectItemInstance> itemsByType = new ItemDictionary<ProjectItemInstance>(); 170List<ProjectItemInstance> items = new List<ProjectItemInstance>(); 172ProjectItemInstance a = new ProjectItemInstance(project, "File", "a.foo", project.FullPath); 174ProjectItemInstance b = new ProjectItemInstance(project, "File", "b.foo", project.FullPath); 204ItemDictionary<ProjectItemInstance> itemsByType = new ItemDictionary<ProjectItemInstance>(); 229ItemDictionary<ProjectItemInstance> itemsByType = new ItemDictionary<ProjectItemInstance>(); 231List<ProjectItemInstance> items = new List<ProjectItemInstance>(); 530private static Lookup CreateLookup(ItemDictionary<ProjectItemInstance> itemsByType, PropertyDictionary<ProjectPropertyInstance> properties)
BackEnd\BuildManager_Tests.cs (1)
2272foreach (var item in instance.Items)
BackEnd\BuildRequestEngine_Tests.cs (1)
16using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\BuildResult_Tests.cs (1)
15using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\CacheSerialization_Tests.cs (5)
55Array.Empty<ProjectItemInstance.TaskItem>(), 60Array.Empty<ProjectItemInstance.TaskItem>(), 65Array.Empty<ProjectItemInstance.TaskItem>(), 71Array.Empty<ProjectItemInstance.TaskItem>(), 77Array.Empty<ProjectItemInstance.TaskItem>(),
BackEnd\IntrinsicTask_Tests.cs (46)
250ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 251ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 702ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 725ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 751ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 822ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 823ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 846ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 867ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 868ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 891ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 892ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 1002ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 1003ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 1029ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 1030ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 1063ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 1120ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 1121ICollection<ProjectItemInstance> i2Group = lookup.GetItems("i2"); 2053ICollection<ProjectItemInstance> items = lookup.GetItems("I2"); 2088ICollection<ProjectItemInstance> items = lookup.GetItems("I3"); 2147ICollection<ProjectItemInstance> i0Group = lookup.GetItems("i0"); 2228ICollection<ProjectItemInstance> i1Group = lookup.GetItems("i1"); 2271ICollection<ProjectItemInstance> linkGroup = lookup.GetItems("link"); 2856ProjectItemInstance item = lookup.GetItems("i1").First(); 2914ProjectItemInstance item = lookup.GetItems("i1").First(); 2965ProjectItemInstance item1 = lookup.GetItems("i1").First(); 2966ProjectItemInstance item2 = lookup.GetItems("i1").ElementAt(1); 2995ProjectItemInstance item1 = lookup.GetItems("i1").First(); 2996ProjectItemInstance item2 = lookup.GetItems("i1").ElementAt(1); 3044ProjectItemInstance item1 = lookup.GetItems("i1").First(); 3045ProjectItemInstance item2 = lookup.GetItems("i1").ElementAt(1); 3075ProjectItemInstance item1 = lookup.GetItems("i1").First(); 3076ProjectItemInstance item2 = lookup.GetItems("i1").ElementAt(1); 3115ICollection<ProjectItemInstance> i0Group = lookup.GetItems("i0"); 3118foreach (ProjectItemInstance item in i0Group) 3205ProjectItemInstance item = p.ItemsToBuildWith["i0"].First(); 3925List<ProjectItemInstance> items = new List<ProjectItemInstance>(); 3926ProjectItemInstance item1 = new ProjectItemInstance(project, "i0", "a1", project.FullPath); 3927ProjectItemInstance item2 = new ProjectItemInstance(project, "i0", "a2", project.FullPath); 3928ProjectItemInstance item3 = new ProjectItemInstance(project, "i0", "a3", project.FullPath); 3929ProjectItemInstance item4 = new ProjectItemInstance(project, "i0", "a4", project.FullPath); 3942ItemDictionary<ProjectItemInstance> itemsByName = new ItemDictionary<ProjectItemInstance>(); 4001var lookup = new Lookup(new ItemDictionary<ProjectItemInstance>(), new PropertyDictionary<ProjectPropertyInstance>());
BackEnd\LoggingServicesLogMethod_Tests.cs (1)
22using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\Lookup_Tests.cs (117)
28ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 50ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 83ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 153ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 163ProjectItemInstance[] newItems = new ProjectItemInstance[] 203ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 213ProjectItemInstance[] newItems = new ProjectItemInstance[] 254ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 255ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a1", project.FullPath); 264ProjectItemInstance item2 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 304ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 306ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 359ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 366ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 401ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 407ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 416ICollection<ProjectItemInstance> group = lookup.GetItems(item1.ItemType); 465ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 471ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 481ICollection<ProjectItemInstance> group = lookup.GetItems(item1.ItemType); 525ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 531ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 541ICollection<ProjectItemInstance> group = lookup.GetItems(item1.ItemType); 596ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 602ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 612ICollection<ProjectItemInstance> group = lookup.GetItems(item1.ItemType); 663ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 669ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 679ICollection<ProjectItemInstance> group = lookup.GetItems(item1.ItemType); 718ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 724ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 733ICollection<ProjectItemInstance> group = lookup.GetItems(item1.ItemType); 766ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 772ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 781ICollection<ProjectItemInstance> group = new List<ProjectItemInstance>(); 822ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 826ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 836ICollection<ProjectItemInstance> group = new List<ProjectItemInstance>(); 863ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 867ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 876ICollection<ProjectItemInstance> group = new List<ProjectItemInstance>(); 898ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 902ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 911ICollection<ProjectItemInstance> group = lookup.GetItems("i1"); 921group = new List<ProjectItemInstance>(); 926ICollection<ProjectItemInstance> foundGroup = lookup.GetItems("i1"); 969ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 975ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 982ICollection<ProjectItemInstance> group = new List<ProjectItemInstance>(); 1015Lookup lookup = LookupHelpers.CreateLookup(new ItemDictionary<ProjectItemInstance>()); 1026ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 1030ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 1039ICollection<ProjectItemInstance> group = new List<ProjectItemInstance>(); 1044ICollection<ProjectItemInstance> group2 = lookup.GetItems(item1.ItemType); 1046ProjectItemInstance item1b = group2.First(); 1051ICollection<ProjectItemInstance> group3 = new List<ProjectItemInstance>(); 1056ICollection<ProjectItemInstance> group4 = lookup.GetItems(item1b.ItemType); 1064ICollection<ProjectItemInstance> group5 = lookup.GetItems(item1b.ItemType); 1078ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 1079ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 1090List<ProjectItemInstance> group = new List<ProjectItemInstance>(); 1095ICollection<ProjectItemInstance> group2 = lookup.GetItems(item1.ItemType); 1097ProjectItemInstance item1b = group2.First(); 1102List<ProjectItemInstance> group3 = new List<ProjectItemInstance>(); 1107ICollection<ProjectItemInstance> group4 = lookup.GetItems(item1b.ItemType); 1115ICollection<ProjectItemInstance> group5 = lookup.GetItems(item1b.ItemType); 1130ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 1134ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 1143List<ProjectItemInstance> group = new List<ProjectItemInstance>(); 1148ICollection<ProjectItemInstance> group2 = lookup.GetItems(item1.ItemType); 1150ProjectItemInstance item1b = group2.First(); 1156ICollection<ProjectItemInstance> group3 = lookup.GetItems(item1.ItemType); 1168ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>(); 1169ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath); 1180List<ProjectItemInstance> group = new List<ProjectItemInstance>(); 1185ICollection<ProjectItemInstance> group2 = lookup.GetItems(item1.ItemType); 1187ProjectItemInstance item1b = group2.First(); 1193ICollection<ProjectItemInstance> group3 = lookup.GetItems(item1.ItemType); 1292Lookup lookup = new Lookup(new ItemDictionary<ProjectItemInstance>(), new PropertyDictionary<ProjectPropertyInstance>()); 1296internal static Lookup CreateLookup(ItemDictionary<ProjectItemInstance> items) 1304Lookup lookup = new Lookup(new ItemDictionary<ProjectItemInstance>(), properties); 1308internal static Lookup CreateLookup(PropertyDictionary<ProjectPropertyInstance> properties, ItemDictionary<ProjectItemInstance> items)
BackEnd\MockLoggingService.cs (1)
16using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\NodePackets_Tests.cs (1)
15using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\RequestBuilder_Tests.cs (1)
16using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\Scheduler_Tests.cs (1)
16using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\TargetBuilder_Tests.cs (1)
1572Lookup lookup = new Lookup(new ItemDictionary<ProjectItemInstance>(project.Items), new PropertyDictionary<ProjectPropertyInstance>(project.Properties));
BackEnd\TargetEntry_Tests.cs (3)
85Lookup lookup = new Lookup(new ItemDictionary<ProjectItemInstance>(project.Items), new PropertyDictionary<ProjectPropertyInstance>(project.Properties)); 115Lookup lookup = new Lookup(new ItemDictionary<ProjectItemInstance>(project.Items), new PropertyDictionary<ProjectPropertyInstance>(project.Properties)); 1030Lookup lookup = new Lookup(new ItemDictionary<ProjectItemInstance>(project.Items), new PropertyDictionary<ProjectPropertyInstance>(project.Properties));
BackEnd\TargetResult_Tests.cs (1)
11using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\TargetUpToDateChecker_Tests.cs (25)
182List<ProjectItemInstance> items = new List<ProjectItemInstance>(); 186ItemDictionary<ProjectItemInstance> itemsByName = new ItemDictionary<ProjectItemInstance>(); 224List<ProjectItemInstance> items = new List<ProjectItemInstance>(); 229ItemDictionary<ProjectItemInstance> itemsByName = new ItemDictionary<ProjectItemInstance>(); 271List<ProjectItemInstance> items = new List<ProjectItemInstance>(); 279ItemDictionary<ProjectItemInstance> itemsByName = new ItemDictionary<ProjectItemInstance>(); 282ItemDictionary<ProjectItemInstance> changedTargetInputs = new ItemDictionary<ProjectItemInstance>(); 283ItemDictionary<ProjectItemInstance> upToDateTargetInputs = new ItemDictionary<ProjectItemInstance>(); 286foreach (ProjectItemInstance itemInstance in changedTargetInputs) 557ItemDictionary<ProjectItemInstance> itemsByName, 561ItemDictionary<ProjectItemInstance> h1 = new ItemDictionary<ProjectItemInstance>(); 562ItemDictionary<ProjectItemInstance> h2 = new ItemDictionary<ProjectItemInstance>(); 568ItemDictionary<ProjectItemInstance> itemsByName, 571out ItemDictionary<ProjectItemInstance> changedTargetInputs, 572out ItemDictionary<ProjectItemInstance> upToDateTargetInputs)
BackEnd\TaskExecutionHost_Tests.cs (5)
25using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem; 1271ItemDictionary<ProjectItemInstance> itemsByName = new ItemDictionary<ProjectItemInstance>(); 1273ProjectItemInstance item = new ProjectItemInstance(project, "ItemListContainingOneItem", "a.cs", "."); 1279ProjectItemInstance item2 = new ProjectItemInstance(project, "ItemListContainingTwoItems", "c.cs", ".");
BackEnd\TaskHost_Tests.cs (1)
18using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
BackEnd\TaskRegistry_Tests.cs (22)
46private static Expander<ProjectPropertyInstance, ProjectItemInstance> s_registryExpander; 2167internal static Expander<ProjectPropertyInstance, ProjectItemInstance> RegistryExpander => s_registryExpander ?? (s_registryExpander = GetExpander()); 2201internal static Expander<ProjectPropertyInstance, ProjectItemInstance> GetExpander() 2214List<ProjectItemInstance> intermediateAssemblyItemGroup = new List<ProjectItemInstance>(); 2215ProjectItemInstance iag = new ProjectItemInstance(project, "IntermediateAssembly", @"subdir1\engine.dll", project.FullPath); 2223List<ProjectItemInstance> firstItemGroup = new List<ProjectItemInstance>(); 2226ProjectItemInstance fig = new ProjectItemInstance(project, "FirstItem" + i, "FirstValue" + i, project.FullPath); 2230List<ProjectItemInstance> secondItemGroup = new List<ProjectItemInstance>(); 2233ProjectItemInstance sig = new ProjectItemInstance(project, "SecondItem" + i, "SecondValue" + i, project.FullPath); 2237List<ProjectItemInstance> thirdItemGroup = new List<ProjectItemInstance>(); 2238ProjectItemInstance tig = new ProjectItemInstance(project, "ThirdItem", "ThirdValue1", project.FullPath); 2241List<ProjectItemInstance> trueItemGroup = new List<ProjectItemInstance>(); 2242ProjectItemInstance trig = new ProjectItemInstance(project, "ItemWithTrueItem", "true", project.FullPath); 2245ItemDictionary<ProjectItemInstance> secondaryItemsByName = new ItemDictionary<ProjectItemInstance>(); 2252Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(
BuildResultUtilities.cs (1)
7using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
Collections\OMcollections_tests.cs (18)
108ItemDictionary<ProjectItemInstance> items = new ItemDictionary<ProjectItemInstance>(); 114using (IEnumerator<ProjectItemInstance> enumerator = items.GetEnumerator()) 124List<ProjectItemInstance> list = new List<ProjectItemInstance>(); 125foreach (ProjectItemInstance item in items) 133ICollection<ProjectItemInstance> itemList = items["x"]; 136foreach (ProjectItemInstance item in items) 144ProjectItemInstance item1 = GetItemInstance("i", "i1"); 152ProjectItemInstance item2 = GetItemInstance("i", "i2"); 154ProjectItemInstance item3 = GetItemInstance("j", "j1"); 158list = new List<ProjectItemInstance>(); 159foreach (ProjectItemInstance item in items) 170using (IEnumerator<ProjectItemInstance> enumerator = items.GetEnumerator()) 321private static ProjectItemInstance GetItemInstance(string itemType, string evaluatedInclude) 325ProjectItemInstance item = projectInstance.AddItem(itemType, evaluatedInclude); 353private int ProjectItemInstanceComparer(ProjectItemInstance one, ProjectItemInstance two)
ConsoleLogger_Tests.cs (1)
22using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
Construction\SolutionProjectGenerator_Tests.cs (3)
2851IEnumerable<ProjectItemInstance> itemGroup = msbuildProject.GetItems(itemType); 2854foreach (ProjectItemInstance item in itemGroup) 2871IEnumerable<ProjectItemInstance> itemGroup = msbuildProject.GetItems(itemType);
Definition\ItemDefinitionGroup_Tests.cs (2)
16using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem; 683foreach (ProjectItemInstance item in pi.GetItems("ItemA"))
EscapingInProjects_Tests.cs (1)
653IEnumerable<ProjectItemInstance> items = projectInstance.GetItems("ProjectFile");
Evaluation\Evaluator_Tests.cs (2)
4462Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, FileSystems.Default);
Evaluation\Expander_Tests.cs (303)
31using ProjectItemInstanceFactory = Microsoft.Build.Execution.ProjectItemInstance.TaskItem.ProjectItemInstanceFactory; 32using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem; 47Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 58Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 69Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 85List<ProjectItemInstance> ig = new List<ProjectItemInstance>(); 89List<ProjectItemInstance> ig2 = new List<ProjectItemInstance>(); 92ItemDictionary<ProjectItemInstance> itemsByType = new ItemDictionary<ProjectItemInstance>(); 96Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>( 121Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 145Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 148IList<ProjectItemInstance> itemsOut = expander.ExpandIntoItemsLeaveEscaped("foo$(a);$(b);$(c);$(d", itemFactory, ExpanderOptions.ExpandProperties, MockElementLocation.Instance); 162Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 179IList<ProjectItemInstance> items = expander.ExpandIntoItemsLeaveEscaped("@(i)", itemFactory, ExpanderOptions.ExpandItems, MockElementLocation.Instance); 199IList<ProjectItemInstance> items = expander.ExpandIntoItemsLeaveEscaped("@(i)", itemFactory, ExpanderOptions.ExpandItems, MockElementLocation.Instance); 219IList<ProjectItemInstance> itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->AnyHaveMetadataValue('Even', 'true'))", itemFactory, ExpanderOptions.ExpandItems, MockElementLocation.Instance); 225IList<ProjectItemInstance> itemsFalse = expander.ExpandIntoItemsLeaveEscaped("@(i->AnyHaveMetadataValue('Even', 'goop'))", itemFactory, ExpanderOptions.ExpandItems, MockElementLocation.Instance); 236Expander<ProjectPropertyInstance, ProjectItemInstance> expander = CreateItemFunctionExpander(); 239IList<ProjectItemInstance> itemsEmpty = expander.ExpandIntoItemsLeaveEscaped("@(unsetItem->AnyHaveMetadataValue('Metadatum', 'value'))", itemFactory, ExpanderOptions.ExpandItems, MockElementLocation.Instance); 240ProjectItemInstance pii = itemsEmpty.ShouldHaveSingleItem<ProjectItemInstance>(); 257IList<ProjectItemInstance> itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->Metadata('Meta0')->DirectoryName()->Distinct())", itemFactory, ExpanderOptions.ExpandItems, MockElementLocation.Instance); 263IList<ProjectItemInstance> itemsDir = expander.ExpandIntoItemsLeaveEscaped("@(i->Metadata('Meta9')->DirectoryName()->Distinct())", itemFactory, ExpanderOptions.ExpandItems, MockElementLocation.Instance); 283IList<ProjectItemInstance> itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->Metadata('Meta0')->Directory())", itemFactory, ExpanderOptions.ExpandItems, MockElementLocation.Instance); 656IList<ProjectItemInstance> itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->'%(Meta0)'->'%(Directory)')", itemFactory, ExpanderOptions.ExpandItems, MockElementLocation.Instance); 694IList<ProjectItemInstance> itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->Metadata('Meta0')->DirectoryName())", itemFactory, ExpanderOptions.ExpandItems, MockElementLocation.Instance); 714IList<ProjectItemInstance> items = expander.ExpandIntoItemsLeaveEscaped("@(i->Metadata('Meta10')->DirectoryName())", itemFactory, ExpanderOptions.ExpandItems, MockElementLocation.Instance); 734IList<ProjectItemInstance> items = expander.ExpandIntoItemsLeaveEscaped("@(i->ClearMetadata())", itemFactory, ExpanderOptions.ExpandItems, MockElementLocation.Instance); 745private Expander<ProjectPropertyInstance, ProjectItemInstance> CreateItemFunctionExpander() 754ItemDictionary<ProjectItemInstance> ig = new ItemDictionary<ProjectItemInstance>(); 758ProjectItemInstance pi = new ProjectItemInstance(project, "i", "i" + n.ToString(), project.FullPath); 785Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, ig, itemMetadata, FileSystems.Default); 794private Expander<ProjectPropertyInstance, ProjectItemInstance> CreateExpander() 801ItemDictionary<ProjectItemInstance> ig = new ItemDictionary<ProjectItemInstance>(); 802ProjectItemInstance i0 = new ProjectItemInstance(project, "i", "i0", project.FullPath); 803ProjectItemInstance i1 = new ProjectItemInstance(project, "i", "i1", project.FullPath); 807Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>( 1368List<ProjectItemInstance> intermediateAssemblyItemGroup = new List<ProjectItemInstance>(); 1369ProjectItemInstance i1 = new ProjectItemInstance(project, "IntermediateAssembly", 1373ProjectItemInstance i2 = new ProjectItemInstance(project, "IntermediateAssembly", 1378List<ProjectItemInstance> contentItemGroup = new List<ProjectItemInstance>(); 1379ProjectItemInstance i3 = new ProjectItemInstance(project, "Content", "splash.bmp", project.FullPath); 1383List<ProjectItemInstance> resourceItemGroup = new List<ProjectItemInstance>(); 1384ProjectItemInstance i4 = new ProjectItemInstance(project, "Resource", "string$(p).resx", project.FullPath); 1387ProjectItemInstance i5 = new ProjectItemInstance(project, "Resource", "dialogs%253b.resx", project.FullPath); 1391List<ProjectItemInstance> contentItemGroup2 = new List<ProjectItemInstance>(); 1392ProjectItemInstance i6 = new ProjectItemInstance(project, "Content", "about.bmp", project.FullPath); 1396ItemDictionary<ProjectItemInstance> secondaryItemsByName = new ItemDictionary<ProjectItemInstance>(); 1420Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1452Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1505Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1531Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1553Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1579var projectItemGroups = new ItemDictionary<ProjectItemInstance>(); 1580var itemGroup = new List<ProjectItemInstance>(); 1583var item = new ProjectItemInstance(project, "ManyItems", $"ThisIsAFairlyLongFileName_{i}.bmp", project.FullPath); 1602Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1634Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1665Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1686Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1728Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1744Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1762Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1779Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1793Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1815Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1840Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1863Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1885Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1907Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2002Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2017Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2037Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2053Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2069Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2085Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2101Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2117Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2133Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2150Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2167Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2184Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2202Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2220Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2236Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2251Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2267Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2284Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2302Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2319Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2355Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2373Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2390Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2407Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2424Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2440Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2456Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2471Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2484Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2500Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2519Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2536Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2552Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2576Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2595Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2618Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2647Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2681Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2697Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2715Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2733Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2749Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2765Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2780Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2796Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2814Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2839Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2854Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2884var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2914var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2936var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2952var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2968var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2986var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3002var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3021var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3037var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3056var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3069var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3081var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3092var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3105var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3116var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3128var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3139var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3152var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3163var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3176var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3198var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3207var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3223var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3256var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3275var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3289var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3302var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3316var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3338var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3343private void AssertThrows(Expander<ProjectPropertyInstance, ProjectItemInstance> expander, string expression, string expectedMessage) 3354private void AssertSuccess(Expander<ProjectPropertyInstance, ProjectItemInstance> expander, object expected, string expression) 3372Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3395Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3429Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3472Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3488Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3507Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3522Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3537Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3558Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3608Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(new[] 3633Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3703Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3729Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3780Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3800Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3817Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3841Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3865Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3889Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3915List<ProjectItemInstance> ig = new List<ProjectItemInstance>(); 3919ItemDictionary<ProjectItemInstance> itemsByType = new ItemDictionary<ProjectItemInstance>(); 3922Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, itemsByType, itemMetadata, FileSystems.Default); 3959Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3996Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4025Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new(pg, FileSystems.Default); 4039Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new(pg, FileSystems.Default); 4051Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new(pg, FileSystems.Default); 4087Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4350Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4376Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4422var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 4434var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 4446var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 4748var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(properties, FileSystems.Default); 4799ICollection<ProjectItemInstance> myDirectories = projectInstance.GetItems("MyDirectories"); 4843ICollection<ProjectItemInstance> myDirectories = projectInstance.GetItems("MyDirectories"); 4872ICollection<ProjectItemInstance> squiggles = projectInstance.GetItems("Squiggle"); 4919ICollection<ProjectItemInstance> squiggleItems = projectInstance.GetItems("Compile"); 4960ICollection<ProjectItemInstance> squiggleItems = projectInstance.GetItems("MyDirectory"); 5139_ = new Expander<ProjectPropertyInstance, ProjectItemInstance>( 5177var result = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default, loggingContext)
Evaluation\ItemSpec_Tests.cs (4)
16Microsoft.Build.Evaluation.Expander<Microsoft.Build.Execution.ProjectPropertyInstance, Microsoft.Build.Execution.ProjectItemInstance>; 18Microsoft.Build.Evaluation.ItemSpec<Microsoft.Build.Execution.ProjectPropertyInstance, Microsoft.Build.Execution.ProjectItemInstance>; 99private static ItemDictionary<ProjectItemInstance> ToItemDictionary(Dictionary<string, string[]> itemTypes) 101var itemDictionary = new ItemDictionary<ProjectItemInstance>();
ExpressionTree_Tests.cs (51)
30Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 46Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 71Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 90Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 102Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), new ItemDictionary<ProjectItemInstance>(), FileSystems.Default, null); 112new ConditionEvaluator.ConditionEvaluationState<ProjectPropertyInstance, ProjectItemInstance>( 152Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, new ItemDictionary<ProjectItemInstance>(), FileSystems.Default, null); 184ItemDictionary<ProjectItemInstance> itemBag = new ItemDictionary<ProjectItemInstance>(); 190Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), itemBag, FileSystems.Default, null); 214ItemDictionary<ProjectItemInstance> itemBag = new ItemDictionary<ProjectItemInstance>(); 233Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, itemBag, FileSystems.Default, null); 249ItemDictionary<ProjectItemInstance> itemBag = new ItemDictionary<ProjectItemInstance>(); 265Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, itemBag, FileSystems.Default, null); 281ItemDictionary<ProjectItemInstance> itemBag = new ItemDictionary<ProjectItemInstance>(); 286Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, itemBag, FileSystems.Default, null); 298ItemDictionary<ProjectItemInstance> itemBag = new ItemDictionary<ProjectItemInstance>(); 315Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, itemBag, FileSystems.Default, null); 327ItemDictionary<ProjectItemInstance> itemBag = new ItemDictionary<ProjectItemInstance>(); 332Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), itemBag, FileSystems.Default, null); 335new ConditionEvaluator.ConditionEvaluationState<ProjectPropertyInstance, ProjectItemInstance>( 419Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, new ItemDictionary<ProjectItemInstance>(), FileSystems.Default, null); 427private void AssertParseEvaluate(Parser p, string expression, Expander<ProjectPropertyInstance, ProjectItemInstance> expander, bool expected) 432private void AssertParseEvaluate(Parser p, string expression, Expander<ProjectPropertyInstance, ProjectItemInstance> expander, bool expected, ConditionEvaluator.IConditionEvaluationState state) 444new ConditionEvaluator.ConditionEvaluationState<ProjectPropertyInstance, ProjectItemInstance>( 459private void AssertParseEvaluateThrow(Parser p, string expression, Expander<ProjectPropertyInstance, ProjectItemInstance> expander) 464private void AssertParseEvaluateThrow(Parser p, string expression, Expander<ProjectPropertyInstance, ProjectItemInstance> expander, ConditionEvaluator.IConditionEvaluationState state) 480new ConditionEvaluator.ConditionEvaluationState<ProjectPropertyInstance, ProjectItemInstance>( 506Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default);
ExpressionTreeExpression_Tests.cs (7)
28private readonly Expander<ProjectPropertyInstance, ProjectItemInstance> _expander; 368ItemDictionary<ProjectItemInstance> itemBag = new ItemDictionary<ProjectItemInstance>(); 404_expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, itemBag, itemMetadata, FileSystems.Default); 438new ConditionEvaluator.ConditionEvaluationState<ProjectPropertyInstance, ProjectItemInstance>( 462new ConditionEvaluator.ConditionEvaluationState<ProjectPropertyInstance, ProjectItemInstance>( 494new ConditionEvaluator.ConditionEvaluationState<ProjectPropertyInstance, ProjectItemInstance>(
Graph\GraphLoadedFromSolution_tests.cs (5)
639IEnumerable<ProjectItemInstance> GetOutgoingEdgeItemsFromNode(ProjectGraphNode node, IReadOnlyDictionary<(ConfigurationMetadata, ConfigurationMetadata), ProjectItemInstance> edgeInfos) 644IEnumerable<ProjectItemInstance> GetIncomingEdgeItemsToNode(ProjectGraphNode node, IReadOnlyDictionary<(ConfigurationMetadata, ConfigurationMetadata), ProjectItemInstance> edgeInfos) 650private static bool IsSolutionItemReference(ProjectItemInstance edgeItem)
Graph\GraphTestingUtilities.cs (3)
57ProjectItemInstance edge = graph.TestOnly_Edges[(outerBuild, innerBuild)]; 82ProjectItemInstance edgeToOuterBuild = graph.TestOnly_Edges[(outerBuildReferencer, outerBuild)]; 83ProjectItemInstance edgeToInnerBuild = graph.TestOnly_Edges[(outerBuildReferencer, innerBuild)];
Graph\ProjectGraph_Tests.cs (5)
137var referenceItem1 = new ProjectItemInstance(projectInstance, "Ref1", "path1", "file1"); 140var referenceItem2 = new ProjectItemInstance(projectInstance, "Ref2", "path2", "file2"); 184var referenceItem1 = new ProjectItemInstance(projectInstance, "Ref1", "path1", "file1"); 185var referenceItem2 = new ProjectItemInstance(projectInstance, "Ref2", "path1", "file1"); 1957var edgeToOuterBuild = graph.TestOnly_Edges[(outerBuildReferencingNode, GetOuterBuild(graph, 2))];
Instance\ProjectMetadataInstance_Internal_Tests.cs (1)
58ProjectItemInstance item = projectInstance.AddItem("i", "i1");
Instance\TaskItem_Tests.cs (1)
18using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
MockTask.cs (1)
9using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
TestComparers\ProjectInstanceModelTestComparers.cs (2)
13Microsoft.Build.Evaluation.IEvaluatorData<Microsoft.Build.Execution.ProjectPropertyInstance, Microsoft.Build.Execution.ProjectItemInstance, 32Assert.Equal(x.Items.ToArray(), y.Items.ToArray(), ProjectItemInstance.ProjectItemInstanceEqualityComparer.Default);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (8)
TargetTests.cs (8)
168var item = items.Single(); 201var item = items.Single(); 230var item = items.Single(); 262var item = items.Single(); 304var item = items.Single(); 344var item = items.Single(); 379var item = items.Single(); 844var item = items.Single();
Microsoft.Build.Tasks.UnitTests (2)
CallTarget_Tests.cs (2)
180IEnumerable<ProjectItemInstance> targetOutputs = instance.GetItems("myfancytargetoutputs"); 184foreach (ProjectItemInstance item in targetOutputs)
Microsoft.Build.UnitTests.Shared (4)
BuildEventArgsExtension.cs (1)
7using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
ObjectModelHelpers.cs (3)
230private readonly ProjectItemInstance _projectInstance; 232public ProjectItemInstanceTestItemAdapter(ProjectItemInstance projectInstance) 241public static implicit operator ProjectItemInstanceTestItemAdapter(ProjectItemInstance pi)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
MSBuild\ProjectFile\Extensions.cs (3)
41foreach (var item in packageReferenceItems) 55private static ProjectFileReference CreateProjectFileReference(MSB.Execution.ProjectItemInstance reference) 96foreach (var item in executedProject.GetItems(itemType))
MSBuild (1)
JsonOutputFormatter.cs (1)
59foreach (ProjectItemInstance item in project.GetItems(itemName))