1 type derived from ProjectItem
Microsoft.Build (1)
ObjectModelRemoting\LinkedObjectFactory.cs (1)
241
private class LinkedProjectItem :
ProjectItem
, ILinkableObject, IImmutableInstanceProvider<ProjectItemInstance>
2 instantiations of ProjectItem
Microsoft.Build (2)
Definition\ProjectItem.cs (2)
1022
return new
ProjectItem
(_project, _xml, evaluatedIncludeEscaped, evaluatedIncludeBeforeWildcardExpansion, null /* no metadata */, null /* no inherited definition metadata */);
1086
return new
ProjectItem
(_project, _xml, evaluatedIncludeEscaped, evaluatedIncludeBeforeWildcardExpansionEscaped, directMetadataClone, inheritedItemDefinitionsClone);
517 references to ProjectItem
dotnet-openapi (3)
Commands\RefreshCommand.cs (1)
44
foreach (
ProjectItem
item in openApiReferenceItems)
Commands\RemoveCommand.cs (1)
56
foreach (
ProjectItem
item in openApiReferenceItems)
ProjectExtensions.cs (1)
14
var
item = project.AddItem(tagName, include).Single();
Microsoft.Build (176)
Construction\Solution\SolutionProjectGenerator.cs (3)
23
using ProjectItem = Microsoft.Build.Evaluation.
ProjectItem
;
2153
IEnumerable<
ProjectItem
> references = msbuildProject.GetItems("ProjectDependency");
2155
foreach (
ProjectItem
reference in references)
Definition\Project.cs (99)
27
using EvaluationItemExpressionFragment = Microsoft.Build.Evaluation.ItemSpec<Microsoft.Build.Evaluation.ProjectProperty, Microsoft.Build.Evaluation.
ProjectItem
>.ItemExpressionFragment;
28
using EvaluationItemSpec = Microsoft.Build.Evaluation.ItemSpec<Microsoft.Build.Evaluation.ProjectProperty, Microsoft.Build.Evaluation.
ProjectItem
>;
33
using ProjectItemFactory = Microsoft.Build.Evaluation.
ProjectItem
.ProjectItemFactory;
92
/// - <see cref="
ProjectItem
.ChangeItemType"/>
93
/// - <see cref="
ProjectItem
.Rename"/>
94
/// - <see cref="
ProjectItem
.RemoveMetadata"/>
95
/// - <see cref="
ProjectItem
.SetMetadataValue(string,string)"/>
96
/// - <see cref="
ProjectItem
.SetMetadataValue(string,string, bool)"/>
665
public ICollection<
ProjectItem
> Items => implementation.Items;
675
public ICollection<
ProjectItem
> ItemsIgnoringCondition => implementation.ItemsIgnoringCondition;
728
public ICollection<
ProjectItem
> AllEvaluatedItems => implementation.AllEvaluatedItems;
851
public static string GetEvaluatedItemIncludeEscaped(
ProjectItem
item)
1053
public List<ProvenanceResult> GetItemProvenance(
ProjectItem
item)
1059
/// See <see cref="GetItemProvenance(
ProjectItem
)"/>.
1070
public List<ProvenanceResult> GetItemProvenance(
ProjectItem
item, EvaluationContext evaluationContext)
1089
public static string GetMetadataValueEscaped(
ProjectItem
item, string name)
1190
public IList<
ProjectItem
> AddItem(string itemType, string unevaluatedInclude)
1204
public IList<
ProjectItem
> AddItem(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
1219
public IList<
ProjectItem
> AddItemFast(string itemType, string unevaluatedInclude)
1235
public IList<
ProjectItem
> AddItemFast(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
1249
public ICollection<
ProjectItem
> GetItems(string itemType)
1262
public ICollection<
ProjectItem
> GetItemsIgnoringCondition(string itemType)
1278
public ICollection<
ProjectItem
> GetItemsByEvaluatedInclude(string evaluatedInclude)
1323
public bool RemoveItem(
ProjectItem
item)
1338
public void RemoveItems(IEnumerable<
ProjectItem
> items)
1679
var relevantItems = new List<
ProjectItem
>();
1681
foreach (
ProjectItem
item in Items)
1689
foreach (
ProjectItem
item in relevantItems)
1713
/// Outside this class called ONLY from <see cref="
ProjectItem
.Rename(string)"/>ProjectItem.Rename(string name).
1725
internal void RemoveItemBeforeItemTypeChange(
ProjectItem
item)
1735
internal void ReAddExistingItemAfterItemTypeChange(
ProjectItem
item)
1984
/// - <see cref="
ProjectItem
.Rename"/>
1985
/// - <see cref="
ProjectItem
.RemoveMetadata"/>
1986
/// - <see cref="
ProjectItem
.SetMetadataValue(string,string)"/>
1987
/// - <see cref="
ProjectItem
.SetMetadataValue(string,string, bool)"/>
2218
public override ICollection<
ProjectItem
> Items => new ReadOnlyCollection<
ProjectItem
>(_data.Items);
2228
public override ICollection<
ProjectItem
> ItemsIgnoringCondition
2238
return new ReadOnlyCollection<
ProjectItem
>(_data.ItemsIgnoringCondition);
2365
public override ICollection<
ProjectItem
> AllEvaluatedItems
2369
ICollection<
ProjectItem
> allEvaluatedItems = _data.AllEvaluatedItems;
2373
return ReadOnlyEmptyCollection<
ProjectItem
>.Instance;
2376
return new ReadOnlyCollection<
ProjectItem
>(allEvaluatedItems);
2708
/// See <see cref="ProjectLink.GetItemProvenance(
ProjectItem
, EvaluationContext)"/>.
2719
public override List<ProvenanceResult> GetItemProvenance(
ProjectItem
item, EvaluationContext evaluationContext)
2750
private static IEnumerable<ProjectItemElement> GetItemElementsThatMightAffectItem(List<ProjectItemElement> evaluatedItemElements,
ProjectItem
item)
3004
public override IList<
ProjectItem
> AddItem(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
3053
public override IList<
ProjectItem
> AddItemFast(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
3106
public override ICollection<
ProjectItem
> GetItems(string itemType)
3108
ICollection<
ProjectItem
> items = _data.GetItems(itemType);
3120
public override ICollection<
ProjectItem
> GetItemsIgnoringCondition(string itemType)
3122
ICollection<
ProjectItem
> items = _data.ItemsIgnoringCondition[itemType];
3137
public override ICollection<
ProjectItem
> GetItemsByEvaluatedInclude(string evaluatedInclude)
3139
ICollection<
ProjectItem
> items = _data.GetItemsByEvaluatedInclude(evaluatedInclude);
3215
public override bool RemoveItem(
ProjectItem
item)
3235
public override void RemoveItems(IEnumerable<
ProjectItem
> items)
3243
var itemsList = new List<
ProjectItem
>(items);
3245
foreach (
ProjectItem
item in itemsList)
3400
var relevantItems = new List<
ProjectItem
>();
3402
foreach (
ProjectItem
item in Items)
3410
foreach (
ProjectItem
item in relevantItems)
3434
/// Outside this class called ONLY from <see cref="
ProjectItem
.Rename(string)"/>ProjectItem.Rename(string name).
3478
public void RemoveItemBeforeItemTypeChange(
ProjectItem
item)
3488
public void ReAddExistingItemAfterItemTypeChange(
ProjectItem
item)
3528
List<
ProjectItem
> items = Evaluator<ProjectProperty,
ProjectItem
, ProjectMetadata, ProjectItemDefinition>.CreateItemsFromInclude(
3591
private List<
ProjectItem
> AddItemHelper(ProjectItemElement itemElement, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
3595
List<
ProjectItem
> items = Evaluator<ProjectProperty,
ProjectItem
, ProjectMetadata, ProjectItemDefinition>.CreateItemsFromInclude(
3605
foreach (
ProjectItem
item in items)
3613
foreach (
ProjectItem
item in items)
3634
private bool RemoveItemHelper(
ProjectItem
item)
3717
Evaluator<ProjectProperty,
ProjectItem
, ProjectMetadata, ProjectItemDefinition>.Evaluate(
3966
void RemoveItemBeforeItemTypeChange(
ProjectItem
item);
3968
void ReAddExistingItemAfterItemTypeChange(
ProjectItem
item);
3991
public void RemoveItemBeforeItemTypeChange(
ProjectItem
item) { throw new NotImplementedException(); }
3993
public void ReAddExistingItemAfterItemTypeChange(
ProjectItem
item) { throw new NotImplementedException(); }
4009
internal class Data : IItemProvider<
ProjectItem
>, IPropertyProvider<ProjectProperty>, IEvaluatorData<ProjectProperty,
ProjectItem
, ProjectMetadata, ProjectItemDefinition>
4047
IEnumerable<ProjectItemDefinition> IEvaluatorData<ProjectProperty,
ProjectItem
, ProjectMetadata, ProjectItemDefinition>.ItemDefinitionsEnumerable => ItemDefinitions.Values;
4120
public IItemDictionary<
ProjectItem
> Items { get; private set; }
4130
public ItemDictionary<
ProjectItem
> ItemsIgnoringCondition { get; private set; }
4204
internal IList<
ProjectItem
> AllEvaluatedItems { get; private set; }
4211
internal Expander<ProjectProperty,
ProjectItem
> Expander { get; private set; }
4259
internal MultiDictionary<string,
ProjectItem
> ItemsByEvaluatedIncludeCache { get; private set; }
4269
Items = new ItemDictionary<
ProjectItem
>();
4270
ItemsIgnoringCondition = new ItemDictionary<
ProjectItem
>();
4271
ItemsByEvaluatedIncludeCache = new MultiDictionary<string,
ProjectItem
>(StringComparer.OrdinalIgnoreCase);
4272
Expander = new Expander<ProjectProperty,
ProjectItem
>(Properties, Items, evaluationContext, loggingContext);
4279
AllEvaluatedItems = new List<
ProjectItem
>();
4366
public void AddItem(
ProjectItem
item)
4375
public void AddItemIgnoringCondition(
ProjectItem
item)
4410
public void AddToAllEvaluatedItemsList(
ProjectItem
item)
4514
string IEvaluatorData<ProjectProperty,
ProjectItem
, ProjectMetadata, ProjectItemDefinition>.ExpandString(string unexpandedValue)
4547
public ICollection<
ProjectItem
> GetItems(string itemType)
4581
internal bool RemoveItem(
ProjectItem
item)
4605
internal ICollection<
ProjectItem
> GetItemsByEvaluatedInclude(string evaluatedInclude)
4608
ICollection<
ProjectItem
> items = new ReadOnlyCollection<
ProjectItem
>(ItemsByEvaluatedIncludeCache[evaluatedInclude]);
Definition\ProjectItem.cs (18)
503
if (metadatum != null && Expander<ProjectProperty,
ProjectItem
>.ExpressionMayContainExpandableExpressions(metadatum.EvaluatedValueEscaped))
505
Expander<ProjectProperty,
ProjectItem
> expander = new Expander<ProjectProperty,
ProjectItem
>(null, null, new BuiltInMetadataTable(this), FileSystems.Default);
572
/// If true, adds direct metadata to the <see cref="ProjectItemElement"/> from which this <see cref="
ProjectItem
"/> originated. The intent is to affect all other sibling items.
620
foreach (
var
siblingItem in siblingItems)
906
internal class ProjectItemFactory : IItemFactory<
ProjectItem
,
ProjectItem
>
968
public
ProjectItem
CreateItem(string include, string definingProject)
985
public
ProjectItem
CreateItem(
ProjectItem
source, string definingProject)
1005
public
ProjectItem
CreateItem(string evaluatedIncludeEscaped,
ProjectItem
source, string definingProject)
1018
public
ProjectItem
CreateItem(string evaluatedIncludeEscaped, string evaluatedIncludeBeforeWildcardExpansion, string definingProject)
1028
public void SetMetadata(IEnumerable<KeyValuePair<ProjectMetadataElement, string>> metadata, IEnumerable<
ProjectItem
> destinationItems)
1042
private
ProjectItem
CreateItem(string evaluatedIncludeEscaped, string evaluatedIncludeBeforeWildcardExpansionEscaped,
ProjectItem
source)
1099
private
ProjectItem
_item;
1104
internal BuiltInMetadataTable(
ProjectItem
item)
Evaluation\ProjectParser.cs (1)
10
using Expander = Microsoft.Build.Evaluation.Expander<Microsoft.Build.Evaluation.ProjectProperty, Microsoft.Build.Evaluation.
ProjectItem
>;
Instance\ProjectInstance.cs (20)
406
foreach (
var
item in project.Items)
450
_itemsByEvaluatedInclude = new ImmutableLinkedMultiDictionaryConverter<string,
ProjectItem
, ProjectItemInstance>(
482
foreach (
var
item in linkedProject.Items)
659
var projectItemToInstanceMap = this.CreateItemsSnapshot(new ReadOnlyCollection<
ProjectItem
>(data.Items), data.ItemTypes.Count, keepEvaluationCache);
661
this.CreateEvaluatedIncludeSnapshotIfRequested(keepEvaluationCache, new ReadOnlyCollection<
ProjectItem
>(data.Items), projectItemToInstanceMap);
919
private static ImmutableItemDictionary<
ProjectItem
, ProjectItemInstance> GetImmutableItemsDictionaryFromImmutableProject(
923
var itemsByType = linkedProject.Items as IDictionary<string, ICollection<
ProjectItem
>>;
929
Func<
ProjectItem
, ProjectItemInstance> convertCachedItemToInstance =
932
var itemDictionary = new ImmutableItemDictionary<
ProjectItem
, ProjectItemInstance>(
944
ProjectItem
projectItem)
3289
private void CreateEvaluatedIncludeSnapshotIfRequested(bool keepEvaluationCache, ICollection<
ProjectItem
> items, Dictionary<
ProjectItem
, ProjectItemInstance> projectItemToInstanceMap)
3297
foreach (
var
item in items)
3308
private Dictionary<
ProjectItem
, ProjectItemInstance> CreateItemsSnapshot(ICollection<
ProjectItem
> items, int itemTypeCount, bool keepEvaluationCache)
3312
var projectItemToInstanceMap = keepEvaluationCache ? new Dictionary<
ProjectItem
, ProjectItemInstance>(items.Count) : null;
3314
foreach (
ProjectItem
item in items)
3324
private ProjectItemInstance InstantiateProjectItemInstance(
ProjectItem
item)
3367
ProjectItem
item,
3381
ProjectItem
item)
Instance\ProjectItemInstance.cs (4)
1335
if (metadatum != null && Expander<ProjectProperty,
ProjectItem
>.ExpressionMayContainExpandableExpressions(metadatum.EvaluatedValueEscaped))
2110
internal class TaskItemFactory : IItemFactory<
ProjectItem
, TaskItem>, IItemFactory<ProjectItemInstance, TaskItem>
2164
public TaskItem CreateItem(
ProjectItem
source, string definingProject)
2174
public TaskItem CreateItem(string includeEscaped,
ProjectItem
baseItem, string definingProject)
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
969
else if (items is ItemDictionary<
ProjectItem
> itemDictionary)
ObjectModelRemoting\DefinitionObjectsLinks\ProjectItemLink.cs (14)
14
/// Allow for creating a local representation to external object of type <see cref="
ProjectItem
"/>
19
/// Access to remote <see cref="
ProjectItem
.Project"/>.
24
/// Access to remote <see cref="
ProjectItem
.Xml"/>.
29
/// Access to remote <see cref="
ProjectItem
.EvaluatedInclude"/>.
34
/// Facilitate remoting the <see cref="
ProjectItem
.Metadata"/> and <see cref="
ProjectItem
.MetadataCount"/>.
39
/// Facilitate remoting the <see cref="
ProjectItem
.DirectMetadata"/> and <see cref="
ProjectItem
.DirectMetadataCount"/>.
44
/// Facilitate remoting the <see cref="
ProjectItem
.HasMetadata"/>.
49
/// Facilitate remoting the <see cref="
ProjectItem
.GetMetadata"/>.
54
/// Facilitate remoting the <see cref="
ProjectItem
.GetMetadataValue"/>.
59
/// Facilitate remoting the <see cref="
ProjectItem
.SetMetadataValue(string, string, bool)"/>.
64
/// Facilitate remoting the <see cref="
ProjectItem
.RemoveMetadata"/>.
69
/// Facilitate remoting the <see cref="
ProjectItem
.Rename"/>.
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (12)
66
public abstract ICollection<
ProjectItem
> Items { get; }
71
public abstract ICollection<
ProjectItem
> ItemsIgnoringCondition { get; }
101
public abstract ICollection<
ProjectItem
> AllEvaluatedItems { get; }
154
/// Facilitate remoting the <see cref="Project.GetItemProvenance(
ProjectItem
, EvaluationContext)"/>.
156
public abstract List<ProvenanceResult> GetItemProvenance(
ProjectItem
item, EvaluationContext evaluationContext);
186
public abstract IList<
ProjectItem
> AddItem(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata);
191
public abstract IList<
ProjectItem
> AddItemFast(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata);
196
public abstract ICollection<
ProjectItem
> GetItems(string itemType);
201
public abstract ICollection<
ProjectItem
> GetItemsIgnoringCondition(string itemType);
206
public abstract ICollection<
ProjectItem
> GetItemsByEvaluatedInclude(string evaluatedInclude);
221
public abstract bool RemoveItem(
ProjectItem
item);
226
public abstract void RemoveItems(IEnumerable<
ProjectItem
> items);
ObjectModelRemoting\DefinitionObjectsLinks\ProjectMetadataLink.cs (1)
19
/// Can be either <see cref="
ProjectItem
"/>, or <see cref="ProjectItemDefinition"/>
ObjectModelRemoting\LinkedObjectFactory.cs (1)
80
public
ProjectItem
Create(ProjectItemLink link, Project project = null, ProjectItemElement xml = null)
Utilities\Utilities.cs (2)
723
else if (items is ItemDictionary<
ProjectItem
> projectItemDictionary)
753
else if (items is ItemDictionary<
ProjectItem
> projectItemDictionary)
Microsoft.Build.Engine.OM.UnitTests (275)
Construction\ConstructionEditing_Tests.cs (1)
2325
ProjectItem
item = Helpers.GetFirst(project.Items);
Construction\ProjectFormatting_Tests.cs (2)
286
var
itemToRemove = project.GetItems("Compile").Single(item => item.EvaluatedInclude == "Class2.cs");
325
var
itemToEdit = project.GetItems("Compile").Single(item => item.EvaluatedInclude == "Class2.cs");
Construction\ProjectItemElement_Tests.cs (3)
958
ProjectItem
item = project.AddItem("i", "i1")[0];
974
ProjectItem
item = project.AddItem("i", "i1")[0];
990
ProjectItem
item = project.AddItem("i", "i1")[0];
Definition\DefinitionEditing_Tests.cs (39)
163
List<
ProjectItem
> items = Helpers.MakeList(project.Items);
190
List<
ProjectItem
> items = Helpers.MakeList(project.Items);
292
List<
ProjectItem
> items = Helpers.MakeList(project.Items);
316
ProjectItem
item = project.AddItem("i", "@(h)")[0];
329
IList<
ProjectItem
> items = project.AddItem(
861
ProjectItem
item = Helpers.GetLast(project.Items);
888
ProjectItem
item = Helpers.GetFirst(project.Items);
916
ProjectItem
item = Helpers.GetLast(project.Items);
944
ProjectItem
item = Helpers.GetLast(project.Items);
974
ProjectItem
item = Helpers.GetLast(project.Items);
1002
ProjectItem
item = Helpers.GetFirst(project.GetItems("i"));
1034
ProjectItem
item = Helpers.MakeList(project.GetItems("i"))[1];
1063
ProjectItem
item = Helpers.MakeList(project.GetItems("i"))[1];
1102
ProjectItem
item = Helpers.GetFirst(project.Items);
1144
ProjectItem
item = Helpers.GetFirst(project.Items);
1174
ProjectItem
item = Helpers.GetFirst(project.GetItems("i"));
1210
ProjectItem
item0 = project.AddItem("i", "i1")[0];
1218
ProjectItem
item = Helpers.GetFirst(project.GetItems("i"));
1269
ProjectItem
item = Helpers.GetFirst(project.GetItems("i"));
1398
ProjectItem
item = Helpers.GetFirst(project.Items);
1438
List<
ProjectItem
> itemsIgnoringCondition = Helpers.MakeList(project.GetItemsIgnoringCondition("i"));
1440
ProjectItem
item = itemsIgnoringCondition[0];
1637
var
item = project.AddItem("i", "i1")[0];
1652
var
item = project.AddItem("i", "i1")[0];
1867
ProjectItem
item = project.AddItem("i", "i1")[0];
1882
List<
ProjectItem
> items = Helpers.MakeList(project.Items);
1895
ProjectItem
item = project.AddItem("i", "i1")[0];
1910
List<
ProjectItem
> items = Helpers.MakeList(project.Items);
1924
ProjectItem
item = project.AddItem("i", "i1")[0];
1940
List<
ProjectItem
> items = Helpers.MakeList(project.Items);
1953
IList<
ProjectItem
> items = project.AddItem("i", "a;b");
2011
ProjectItem
item = Helpers.GetFirst(project.Items);
2087
List<
ProjectItem
> items = Helpers.MakeList(project.Items);
2114
List<
ProjectItem
> items = Helpers.MakeList(project.Items);
2216
List<
ProjectItem
> items = Helpers.MakeList(project.Items);
2240
ProjectItem
item = project.AddItemFast("i", "@(h)")[0];
2253
IList<
ProjectItem
> items = project.AddItemFast("i",
2574
private static void AssertDisabledItemSplitting(string projectContents, int itemIndex, SetupProject setupProject, Action<Project,
ProjectItem
> itemOperation, string metadataToInsert = "", Func<string, Project> projectProvider = null)
2601
var
item = project.Items.ElementAt(itemIndex);
Definition\EditingElementsReferencedByOrReferences_Tests.cs (11)
35
ProjectItem
item = project.GetItems("I").Where(i => i.UnevaluatedInclude == "X").First();
49
IEnumerable<
ProjectItem
> items = project.GetItems("I");
69
ProjectItem
item = project.GetItems("I").Where(i => i.EvaluatedInclude == "Y").First();
98
ProjectItem
item = project.GetItems("I").Where(i => i.EvaluatedInclude == "Y").First();
137
ProjectItem
item1 = project.GetItems("I").Where(i => i.EvaluatedInclude == "X").First();
140
ProjectItem
item2 = project.GetItems("I").Where(i => i.EvaluatedInclude == "Y").First();
188
ProjectItem
item1 = project.GetItems("I").Where(i => i.EvaluatedInclude == "X").First();
212
ProjectItem
item2 = project.GetItems("I").Where(i => i.EvaluatedInclude == "Y").First();
240
ProjectItem
item1 = project.GetItems("I").Where(i => i.EvaluatedInclude == "X").First();
244
ProjectItem
item2 = project.GetItems("I").Where(i => i.EvaluatedInclude == "Y").First();
286
ProjectItem
item = project.GetItems("I").First();
Definition\Project_Tests.cs (24)
603
List<
ProjectItem
> items = Helpers.MakeList(project.GetItems("i"));
1669
List<
ProjectItem
> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1"));
1672
foreach (
ProjectItem
item in items)
1692
List<
ProjectItem
> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i&1"));
1695
foreach (
ProjectItem
item in items)
1714
List<
ProjectItem
> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i2"));
1752
ProjectItem
itemToRemove = null;
1755
foreach (
ProjectItem
item in project.Items)
1794
List<
ProjectItem
> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1"));
1814
List<
ProjectItem
> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1"));
1826
ProjectItem
item1 = project.AddItem("i", "i1;j1")[0];
1829
List<
ProjectItem
> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1"));
2222
ProjectItem
itemToRemove = Helpers.GetFirst(project.GetItems("Compile"));
2244
ProjectItem
itemToRemove = Helpers.GetFirst(project.GetItems("Compile"));
2293
List<
ProjectItem
> list = new List<
ProjectItem
>() { project.GetItems("i").FirstOrDefault(), project.GetItems("j").FirstOrDefault() };
2366
project.RemoveItems(new List<
ProjectItem
>() { null });
2404
ProjectItem
item = project.GetItems("i").FirstOrDefault();
2406
project.RemoveItems(new List<
ProjectItem
>() { item });
2407
project.RemoveItems(new List<
ProjectItem
>() { item });
2510
IEnumerable<
ProjectItem
> items = project.GetItems("i");
4336
ProjectItem
item;
4343
private static void GetProjectAndItemAtPosition(string project, string itemValue, int position, out Project p, out
ProjectItem
item)
4424
IList<
ProjectItem
> items = Helpers.MakeList(project.GetItems("i"));
Definition\ProjectItem_Tests.cs (92)
80
ProjectItem
item = project.AddItem("i", "i1")[0];
99
ProjectItem
item = GetOneItem(content);
125
ProjectItem
item = GetOneItem(content);
164
ProjectItem
item = Helpers.GetFirst(project.GetItems("i"));
199
ProjectItem
item = GetOneItem(content);
212
ProjectItem
item = GetOneItemFromFragment(@"<i Include='i0'/>");
223
ProjectItem
item = GetOneItemFromFragment(@"<i Include='i0'/>");
236
ProjectItem
item = GetOneItemFromFragment(@"<i Include='c:\foo\bar.baz'/>");
249
ProjectItem
item = GetOneItemFromFragment(@"<i Include='c:\foo\bar.baz'/>");
262
ProjectItem
item = GetOneItemFromFragment(@"<i Include='c:\foo\bar.baz'/>");
273
ProjectItem
item = GetOneItemFromFragment(@"<i Include='c:\foo\bar.baz'/>");
284
ProjectItem
item =
328
ProjectItem
item = GetOneItemFromFragment(@"<i Include='" + path + "'/>");
369
ProjectItem
item =
416
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment("<i Include='i0;" + directory + (NativeMethodsShared.IsWindows ? @"\**\*;i2'/>" : "/**/*;i2'/>"));
438
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(itemDefinition, allItems: false, ignoreCondition: true);
454
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(itemDefinition.Replace("somedir", directory.Path), allItems: false, ignoreCondition: true);
465
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment("<i Include='a;b' Exclude='b;c'/>");
491
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
519
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
1201
ProjectItem
item1 = project.GetItems("i").First();
1202
ProjectItem
item2 = project.GetItems("j").First();
1242
ProjectItem
item1 = project.GetItems("i").First();
1243
ProjectItem
item1b = project.GetItems("i").ElementAt(1);
1244
ProjectItem
item1c = project.GetItems("i").ElementAt(2);
1245
ProjectItem
item2 = project.GetItems("j").First();
1293
ProjectItem
item1 = project.GetItems("i").First();
1294
ProjectItem
item1b = project.GetItems("i").ElementAt(1);
1295
ProjectItem
item2 = project.GetItems("j").First();
1529
ProjectItem
item = GetOneItem(content);
1554
ProjectItem
item = GetOneItem(content);
1575
ProjectItem
item = GetOneItem(content);
1596
ProjectItem
item = GetOneItem(content);
1618
ProjectItem
item = GetOneItem(content);
1659
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
1686
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
1711
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
1736
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
1761
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
1786
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
1810
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
1834
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
1858
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
1872
ProjectItem
item = project.AddItem("i", "i1")[0];
1895
ProjectItem
item = Helpers.GetFirst(project.GetItems("i"));
1919
ProjectItem
item = Helpers.GetFirst(project.GetItems("i"));
1931
ProjectItem
item = project.AddItem("i", "i1")[0];
1951
ProjectItem
item = Helpers.GetFirst(project.GetItems("i"));
1964
ProjectItem
item = project.AddItem("i", "i1")[0];
1999
var
projectItem = project.Items.Single();
2022
ProjectItem
item = project.AddItem("i", "i1")[0];
2040
ProjectItem
item = project.AddItem("i", "i1")[0];
2067
ProjectItem
item = Helpers.GetFirst(project.GetItems("i"));
2098
ProjectItem
item = Helpers.GetFirst(project.GetItems("i"));
2122
ProjectItem
item = import.AddItem("i", "i1")[0];
2185
var
item = project.GetItems("I").FirstOrDefault();
2230
foreach (
var
item in items)
2290
foreach (
var
item in items)
2315
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(
2326
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(
2338
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(
2349
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(
2370
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content);
2656
IEnumerable<
ProjectItem
> items = project.ItemsIgnoringCondition.Where(i => i.ItemType.Equals("I2"));
2685
IEnumerable<
ProjectItem
> items = project.ItemsIgnoringCondition.Where(i => i.ItemType.Equals("I3"));
2722
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content);
2835
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content);
2872
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(contents, allItems: true);
2916
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(contents, allItems: true);
2942
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content);
2970
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content);
3024
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, true);
3072
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, true);
3107
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, true);
3137
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, true);
3166
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, true);
3185
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, true);
3212
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, true);
3252
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, true);
3339
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, true);
3387
foreach (
var
item in items)
3448
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, true);
3497
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
3532
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content);
3687
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content);
3695
foreach (
var
item in items)
3701
private static List<
ProjectItem
> GetItemsFromFragmentWithGlobs(string itemGroupFragment, params string[] globFiles)
3705
List<
ProjectItem
> itemsFromFragmentWithGlobs;
3720
private static
ProjectItem
GetOneItemFromFragment(string fragment)
3722
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(fragment);
3732
private static
ProjectItem
GetOneItem(string content)
3734
IList<
ProjectItem
> items = ObjectModelHelpers.GetItems(content);
Definition\ProjectItemDefinition_Tests.cs (7)
248
ProjectItem
item = project.GetItems("i").ElementAt(0);
275
ProjectItem
item = project.GetItems("i").ElementAt(0);
302
ProjectItem
item = project.GetItems("i").ElementAt(0);
333
ProjectItem
item = project.GetItems("i").ElementAt(0);
361
ProjectItem
item = project.GetItems("i").ElementAt(0);
391
ProjectItem
item = project.GetItems("i").ElementAt(0);
419
ProjectItem
item = project.GetItems("i").ElementAt(0);
Definition\ProjectMetadata_Tests.cs (8)
30
ProjectItem
item = project.AddItem("i", "i1")[0];
90
ProjectItem
item = project.AddItem("i", "i1")[0];
111
ProjectItem
item = project.AddItem("i", "i1")[0];
129
ProjectItem
item = project.AddItem("j", "j1")[0];
469
ProjectItem
item = Helpers.GetFirst(project.GetItems("i"));
494
ProjectItem
item = project.GetItems("None").Single();
511
Microsoft.Build.Evaluation.
ProjectItem
item = project.AddItem(
524
private void SpecialCharactersInMetadataValueTests(Microsoft.Build.Evaluation.
ProjectItem
item)
Definition\ProtectImports_Tests.cs (27)
185
ProjectItem
item = GetImportedItem(project);
200
ProjectItem
item = GetImportedItem(project);
215
ProjectItem
item = GetImportedItem(project);
230
ProjectItem
item = GetImportedItem(project);
243
ProjectItem
item = GetProjectItem(project);
257
ProjectItem
item = GetProjectItem(project);
271
ProjectItem
item = GetProjectItem(project);
285
ProjectItem
item = GetProjectItem(project);
305
ProjectItem
item = GetImportedItem(project);
320
ProjectItem
item = GetImportedItem(project);
350
ProjectItem
item = GetImportedItem(project);
363
ProjectItem
item = GetProjectItem(project);
377
ProjectItem
item = GetProjectItem(project);
408
ProjectItem
item = GetProjectItem(project);
443
ProjectItem
item = GetProjectItem(project);
456
ProjectItem
item = GetProjectItem(project);
484
ProjectItem
item = GetProjectItem(project);
523
private
ProjectItem
GetImportedItem(Project project)
525
IEnumerable<
ProjectItem
> items = project.GetItems(ItemType).Where(pi => pi.IsImported);
528
ProjectItem
item = items.First();
541
ProjectItem
item = GetImportedItem(project);
558
ProjectItem
item = GetProjectItem(project);
575
ProjectItem
item = GetProjectItem(project);
630
private
ProjectItem
GetProjectItem(Project project)
632
IEnumerable<
ProjectItem
> items = project.GetItems(ItemType).Where(pi => !pi.IsImported);
635
ProjectItem
item = items.First();
648
ProjectItem
item = GetProjectItem(project);
ObjectModelRemoting\Helpers\ViewValidation.cs (1)
265
if (VerifyCheckType<
ProjectItem
>(view, real, context, Verify))
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (8)
27
private
ProjectItem
VerifyAfterAddSingleItem(ObjectType where, ICollection<
ProjectItem
> added, IEnumerable<KeyValuePair<string, string>> metadata)
31
var
result = added.First();
52
public
ProjectItem
AddSingleItemWithVerify(ObjectType where, string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata = null)
59
public
ProjectItem
AddSingleItemFastWithVerify(ObjectType where, string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata = null)
66
public
ProjectItem
GetSingleItemWithVerify(ObjectType which, string evaluatedInclude)
206
public static void Verify(
ProjectItem
view,
ProjectItem
real, ValidationContext context = null)
ObjectModelRemoting\LinkedEvaluationModify_Tests.cs (15)
129
var
fooView = pair.AddSingleItemWithVerify(ObjectType.View, "cpp", "foo.cpp");
132
var
fooViewFast = pair.AddSingleItemFastWithVerify(ObjectType.View, "cpp", "fooFast.cpp");
135
var
fooWithMetadataView = pair.AddSingleItemWithVerify(ObjectType.View, "cpp", "fooWithMetadata.cpp", testMedatada);
138
var
fooWithMetadataViewFast = pair.AddSingleItemWithVerify(ObjectType.View, "cpp", "fooWithMetadataFast.cpp", testMedatada);
142
var
barReal = pair.AddSingleItemWithVerify(ObjectType.Real, "cpp", "bar.cpp");
145
var
barRealFast = pair.AddSingleItemFastWithVerify(ObjectType.Real, "cpp", "barFast.cpp");
148
var
barWithMetadataReal = pair.AddSingleItemWithVerify(ObjectType.Real, "cpp", "barWithMetadata.cpp", testMedatada);
151
var
barWithMetadataRealFast = pair.AddSingleItemWithVerify(ObjectType.Real, "cpp", "barWithMetadataFast.cpp", testMedatada);
162
var
barWithMetadataViewFast = pair.GetSingleItemWithVerify(ObjectType.View, "barWithMetadataFast.cpp");
178
var
barWithMetadataView = pair.GetSingleItemWithVerify(ObjectType.View, "barWithMetadata.cpp");
181
var toRemoveView = new List<
ProjectItem
>() { barWithMetadataView, fooWithMetadataView };
197
var
fooWithMetadataRealFast = pair.GetSingleItemWithVerify(ObjectType.Real, "fooWithMetadataFast.cpp");
216
var
fooRealFast = pair.GetSingleItemWithVerify(ObjectType.Real, "fooFast.cpp");
219
var toRemoveReal = new List<
ProjectItem
>() { fooRealFast, barRealFast };
233
var
fooReal = pair.GetSingleItemWithVerify(ObjectType.Real, "foo.cpp");
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectItemLink.cs (2)
13
internal sealed class MockProjectItemLinkRemoter : MockLinkRemoter<
ProjectItem
>
15
public override
ProjectItem
CreateLinkedObject(IImportHolder holder)
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectLink.cs (31)
48
public ICollection<MockProjectItemLinkRemoter> Items => this.OwningCollection.ExportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Source.Items);
50
public ICollection<MockProjectItemLinkRemoter> ItemsIgnoringCondition => this.OwningCollection.ExportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Source.ItemsIgnoringCondition);
64
public ICollection<MockProjectItemLinkRemoter> AllEvaluatedItems => this.OwningCollection.ExportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Source.AllEvaluatedItems);
73
=> this.OwningCollection.ExportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Source.AddItem(itemType, unevaluatedInclude, metadata));
75
=> this.OwningCollection.ExportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Source.AddItemFast(itemType, unevaluatedInclude, metadata));
80
=> this.OwningCollection.ExportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Source.GetItems(itemType));
83
=> this.OwningCollection.ExportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Source.GetItemsByEvaluatedInclude(evaluatedInclude));
86
=> this.OwningCollection.ExportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Source.GetItemsIgnoringCondition(itemType));
97
public bool RemoveItem(MockProjectItemLinkRemoter item) => this.Source.RemoveItem(this.OwningCollection.Import<
ProjectItem
, MockProjectItemLinkRemoter>(item));
100
=> this.Source.RemoveItems(this.OwningCollection.ImportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(items));
148
public override ICollection<
ProjectItem
> Items => this.Linker.ImportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Proxy.Items);
150
public override ICollection<
ProjectItem
> ItemsIgnoringCondition => this.Linker.ImportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Proxy.ItemsIgnoringCondition);
163
public override ICollection<
ProjectItem
> AllEvaluatedItems
164
=> this.Linker.ImportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Proxy.AllEvaluatedItems);
176
public override IList<
ProjectItem
> AddItem(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
177
=> this.Linker.ImportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Proxy.AddItem(itemType, unevaluatedInclude, metadata));
179
public override IList<
ProjectItem
> AddItemFast(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
180
=> this.Linker.ImportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Proxy.AddItemFast(itemType, unevaluatedInclude, metadata));
211
public override List<ProvenanceResult> GetItemProvenance(
ProjectItem
item, EvaluationContext evaluationContext)
217
public override ICollection<
ProjectItem
> GetItems(string itemType)
218
=> this.Linker.ImportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Proxy.GetItems(itemType));
219
public override ICollection<
ProjectItem
> GetItemsByEvaluatedInclude(string evaluatedInclude)
220
=> this.Linker.ImportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Proxy.GetItemsByEvaluatedInclude(evaluatedInclude));
222
public override ICollection<
ProjectItem
> GetItemsIgnoringCondition(string itemType)
223
=> this.Linker.ImportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(this.Proxy.GetItemsIgnoringCondition(itemType));
234
public override bool RemoveItem(
ProjectItem
item)
235
=> this.Proxy.RemoveItem(this.Linker.Export<
ProjectItem
, MockProjectItemLinkRemoter>(item));
237
public override void RemoveItems(IEnumerable<
ProjectItem
> items)
238
=> this.Proxy.RemoveItems(this.Linker.ExportCollection<
ProjectItem
, MockProjectItemLinkRemoter>(items));
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectMetadataLink.cs (4)
31
var
itemParent = parent as
ProjectItem
;
34
return this.OwningCollection.Export<
ProjectItem
, MockProjectItemLinkRemoter>(itemParent);
73
return this.Linker.Import<
ProjectItem
, MockProjectItemLinkRemoter>(itemParent);
Microsoft.Build.Engine.UnitTests (36)
Definition\ItemDefinitionGroup_Tests.cs (1)
1866
foreach (
ProjectItem
item in project.GetItems(itemType))
Definition\ProjectItem_Tests.cs (9)
12
using ProjectItemFactory = Microsoft.Build.Evaluation.
ProjectItem
.ProjectItemFactory;
29
ProjectItem
item1 = GetOneItemFromFragment(@"<i Include='i1'><m>m1</m></i>");
31
ProjectItem
item2 = factory.CreateItem(item1, item1.Project.FullPath);
47
private static IList<
ProjectItem
> GetItemsFromFragment(string fragment)
59
IList<
ProjectItem
> items = GetItems(content);
67
private static
ProjectItem
GetOneItemFromFragment(string fragment)
69
IList<
ProjectItem
> items = GetItemsFromFragment(fragment);
78
private static IList<
ProjectItem
> GetItems(string content)
84
IList<
ProjectItem
> item = Helpers.MakeList(project.GetItems("i"));
EscapingInProjects_Tests.cs (13)
365
IEnumerable<
ProjectItem
> newItems = EscapingInProjectsHelper.ModifyItemOfTypeInProject(project, "MyWildcard", "b.weirdo", "foo%253Bbar.weirdo");
473
IEnumerable<
ProjectItem
> newItems = project.AddItem("MyWildCard", "foo%253bbar.weirdo");
515
IEnumerable<
ProjectItem
> newItems = project.AddItem("MyWildCard", "foo.AAA%253bBBB");
834
ProjectItem
item = project.GetItems("None").Single();
846
ProjectItem
item = project.AddItem("None", "MetadataTests", new Dictionary<string, string> {
880
IEnumerable<
ProjectItem
> items = project.GetItems("DifferentList");
912
IEnumerable<
ProjectItem
> items = project.GetItems("DifferentList");
1818
internal static IEnumerable<
ProjectItem
> ModifyItemOfTypeInProject(Project project, string itemType, string oldEvaluatedInclude, string newEvaluatedInclude)
1820
IEnumerable<
ProjectItem
> itemsToMatch = project.GetItems(itemType);
1821
List<
ProjectItem
> matchingItems = new List<
ProjectItem
>();
1823
foreach (
ProjectItem
item in itemsToMatch)
1842
internal static void SpecialCharactersInMetadataValueTests(
ProjectItem
item)
Evaluation\Evaluator_Tests.cs (1)
1555
ProjectItem
item = project.AddItem("i", "i1")[0];
Evaluation\ItemEvaluation_Tests.cs (8)
59
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, allItems: true);
108
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, allItems: true);
132
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, allItems: true);
150
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, allItems: true);
181
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, allItems: true);
488
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content, allItems: true);
543
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content.ToString());
555
IList<
ProjectItem
> items = ObjectModelHelpers.GetItemsFromFragment(content);
Evaluation\SdkResultEvaluation_Tests.cs (3)
83
foreach (
var
item in itemsFromResolver)
95
private void ValidateItemFromResolver(
ProjectItem
item)
455
var
item = itemsFromResolver.ShouldHaveSingleItem();
Parser_Tests.cs (1)
579
var
projectItem = project.GetItems("A").FirstOrDefault();
Microsoft.Build.UnitTests.Shared (14)
ObjectModelHelpers.cs (14)
106
public static
ProjectItem
AssertSingleItem(Project p, string type, string itemInclude)
108
ProjectItem
[] items = p.GetItems(type).ToArray();
110
foreach (
ProjectItem
item in items)
211
private readonly
ProjectItem
_projectInstance;
213
public ProjectItemTestItemAdapter(
ProjectItem
projectInstance)
222
public static implicit operator ProjectItemTestItemAdapter(
ProjectItem
pi)
247
public static void AssertItems(string[] expectedItems, ICollection<
ProjectItem
> items, Dictionary<string, string> expectedDirectMetadata = null, bool normalizeSlashes = false)
274
public static void AssertItems(string[] expectedItems, IList<
ProjectItem
> items, Dictionary<string, string>[] expectedDirectMetadataPerItem, bool normalizeSlashes = false)
457
public static void AssertItemHasMetadata(Dictionary<string, string> expected,
ProjectItem
item)
462
public static void AssertItemHasMetadata(string key, string value,
ProjectItem
item)
1083
public static IList<
ProjectItem
> GetItemsFromFragment(string fragment, bool allItems = false, bool ignoreCondition = false)
1087
IList<
ProjectItem
> items = GetItems(content, allItems, ignoreCondition);
1099
public static IList<
ProjectItem
> GetItems(string content, bool allItems = false, bool ignoreCondition = false)
1104
IList<
ProjectItem
> item = Helpers.MakeList(
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (12)
MSBuild\ProjectFile\ProjectFile.cs (12)
300
private IDictionary<string, MSB.Evaluation.
ProjectItem
>? _documents;
306
_documents = new Dictionary<string, MSB.Evaluation.
ProjectItem
>();
312
foreach (
var
item in _loadedProject.GetItems(ItemNames.Compile))
392
var
item = items.FirstOrDefault(it => PathUtilities.PathsEqual(it.EvaluatedInclude, relativePath)
424
var
item = FindReferenceItem(shortAssemblyName, fullAssemblyName, filePath);
431
private MSB.Evaluation.
ProjectItem
FindReferenceItem(string shortAssemblyName, string fullAssemblyName, string filePath)
436
MSB.Evaluation.
ProjectItem
? item = null;
471
private static string GetHintPath(MSB.Evaluation.
ProjectItem
item)
502
var
item = FindProjectReferenceItem(projectName, projectFilePath);
509
private MSB.Evaluation.
ProjectItem
? FindProjectReferenceItem(string projectName, string projectFilePath)
519
MSB.Evaluation.
ProjectItem
? item = null;
552
var
item = analyzers.FirstOrDefault(it => PathUtilities.PathsEqual(it.EvaluatedInclude, relativePath)
MSBuild (1)
JsonOutputFormatter.cs (1)
95
foreach (
ProjectItem
item in project.GetItems(itemName))