1 type derived from ProjectMetadata
Microsoft.Build (1)
ObjectModelRemoting\LinkedObjectFactory.cs (1)
288
private class LinkedProjectMetadata :
ProjectMetadata
, ILinkableObject, IImmutableInstanceProvider<ProjectMetadataInstance>
5 instantiations of ProjectMetadata
Microsoft.Build (5)
Definition\ProjectItem.cs (2)
540
ProjectMetadata metadatum = new
ProjectMetadata
(this, metadataElement, evaluatedInclude, predecessor);
608
metadatum = new
ProjectMetadata
(this, metadatumXml, evaluatedValueEscaped, null /* predecessor unknown */);
Definition\ProjectItemDefinition.cs (2)
180
metadatum = new
ProjectMetadata
(this, metadatumXml, evaluatedValueEscaped, null /* predecessor unknown */);
197
ProjectMetadata metadatum = new
ProjectMetadata
(this, metadataElement, evaluatedValue, predecessor);
Definition\ProjectMetadata.cs (1)
303
return new
ProjectMetadata
(_parent, this.Xml, this.EvaluatedValueEscaped, this.Predecessor);
215 references to ProjectMetadata
Microsoft.Build (109)
Definition\Project.cs (17)
723
public ICollection<
ProjectMetadata
> AllEvaluatedItemDefinitionMetadata => implementation.AllEvaluatedItemDefinitionMetadata;
1084
public static string GetMetadataValueEscaped(
ProjectMetadata
metadatum)
2347
public override ICollection<
ProjectMetadata
> AllEvaluatedItemDefinitionMetadata
2351
ICollection<
ProjectMetadata
> allEvaluatedItemDefinitionMetadata = _data.AllEvaluatedItemDefinitionMetadata;
2355
return ReadOnlyEmptyCollection<
ProjectMetadata
>.Instance;
2358
return new ReadOnlyCollection<
ProjectMetadata
>(allEvaluatedItemDefinitionMetadata);
3534
List<ProjectItem> items = Evaluator<ProjectProperty, ProjectItem,
ProjectMetadata
, ProjectItemDefinition>.CreateItemsFromInclude(
3601
List<ProjectItem> items = Evaluator<ProjectProperty, ProjectItem,
ProjectMetadata
, ProjectItemDefinition>.CreateItemsFromInclude(
3723
Evaluator<ProjectProperty, ProjectItem,
ProjectMetadata
, ProjectItemDefinition>.Evaluate(
4016
internal class Data : IItemProvider<ProjectItem>, IPropertyProvider<ProjectProperty>, IEvaluatorData<ProjectProperty, ProjectItem,
ProjectMetadata
, ProjectItemDefinition>
4054
IEnumerable<ProjectItemDefinition> IEvaluatorData<ProjectProperty, ProjectItem,
ProjectMetadata
, ProjectItemDefinition>.ItemDefinitionsEnumerable => ItemDefinitions.Values;
4203
internal IList<
ProjectMetadata
> AllEvaluatedItemDefinitionMetadata { get; private set; }
4285
AllEvaluatedItemDefinitionMetadata = new List<
ProjectMetadata
>();
4405
public void AddToAllEvaluatedItemDefinitionMetadataList(
ProjectMetadata
itemDefinitionMetadatum)
4426
public IItemDefinition<
ProjectMetadata
> AddItemDefinition(string itemType)
4438
public IItemDefinition<
ProjectMetadata
> GetItemDefinition(string itemType)
4521
string IEvaluatorData<ProjectProperty, ProjectItem,
ProjectMetadata
, ProjectItemDefinition>.ExpandString(string unexpandedValue)
Definition\ProjectItem.cs (47)
31
public class ProjectItem : IItem<
ProjectMetadata
>, IProjectMetadataParent, IItemData
100
private PropertyDictionary<
ProjectMetadata
> _directMetadata;
127
PropertyDictionary<
ProjectMetadata
> directMetadataCloned,
263
public IEnumerable<
ProjectMetadata
> DirectMetadata
265
get { return Link != null ? Link.DirectMetadata : (IEnumerable<
ProjectMetadata
>)_directMetadata ?? (IEnumerable<
ProjectMetadata
>)ReadOnlyEmptyCollection<
ProjectMetadata
>.Instance; }
288
public ICollection<
ProjectMetadata
> Metadata
295
IEnumerable<
ProjectMetadata
> IItem<
ProjectMetadata
>.Metadata => Metadata;
329
internal ICollection<
ProjectMetadata
> MetadataCollection
333
RetrievableEntryHashSet<
ProjectMetadata
> allMetadata = new RetrievableEntryHashSet<
ProjectMetadata
>(MSBuildNameIgnoreCaseComparer.Default);
339
foreach (
ProjectMetadata
metadataFromDefinition in itemDefinition.Metadata)
351
foreach (
ProjectMetadata
metadatum in _inheritedItemDefinitions[i].Metadata)
361
foreach (
ProjectMetadata
metadatum in _directMetadata)
408
public
ProjectMetadata
GetMetadata(string name)
417
ProjectMetadata
result = null;
466
ProjectMetadata
metadatum = GetItemDefinitionMetadata(name);
487
ProjectMetadata
metadatum = _directMetadata[name];
501
ProjectMetadata
metadatum = GetItemDefinitionMetadata(name);
525
ProjectMetadata
IItem<
ProjectMetadata
>.GetMetadata(string name)
534
ProjectMetadata
IItem<
ProjectMetadata
>.SetMetadata(ProjectMetadataElement metadataElement, string evaluatedInclude)
536
_directMetadata ??= new PropertyDictionary<
ProjectMetadata
>();
538
ProjectMetadata
predecessor = GetMetadata(metadataElement.Name);
540
ProjectMetadata
metadatum = new ProjectMetadata(this, metadataElement, evaluatedInclude, predecessor);
557
public
ProjectMetadata
SetMetadataValue(string name, string unevaluatedValue)
575
public
ProjectMetadata
SetMetadataValue(string name, string unevaluatedValue, bool propagateMetadataToSiblingItems)
581
private
ProjectMetadata
SetMetadataOperation(string name, string unevaluatedValue, bool propagateMetadataToSiblingItems)
595
ProjectMetadata
metadatum;
613
_directMetadata ??= new PropertyDictionary<
ProjectMetadata
>();
622
siblingItem._directMetadata ??= new PropertyDictionary<
ProjectMetadata
>();
648
ProjectMetadata
metadatum = _directMetadata?[name];
652
ProjectMetadata
itemDefinitionMetadata = GetItemDefinitionMetadata(name);
837
List<
ProjectMetadata
> temporary = new List<
ProjectMetadata
>(_directMetadata.Count);
839
foreach (
ProjectMetadata
metadatum in _directMetadata)
844
_directMetadata = new PropertyDictionary<
ProjectMetadata
>(_directMetadata.Count);
846
foreach (
ProjectMetadata
metadatum in temporary)
874
private
ProjectMetadata
GetItemDefinitionMetadata(string name)
876
ProjectMetadata
metadataFromDefinition = null;
1030
foreach (IItem<
ProjectMetadata
> item in destinationItems)
1056
PropertyDictionary<
ProjectMetadata
> directMetadataClone = null;
1060
directMetadataClone = new PropertyDictionary<
ProjectMetadata
>(source.DirectMetadataCount);
1062
foreach (
ProjectMetadata
metadatum in source._directMetadata)
Definition\ProjectItemDefinition.cs (13)
28
public class ProjectItemDefinition : IKeyed, IMetadataTable, IItemDefinition<
ProjectMetadata
>, IProjectMetadataParent, IItemTypeDefinition
46
private PropertyDictionary<
ProjectMetadata
> _metadata;
96
public IEnumerable<
ProjectMetadata
> Metadata => Link != null ? Link.Metadata : _metadata ?? [];
120
public
ProjectMetadata
GetMetadata(string name)
145
public
ProjectMetadata
SetMetadataValue(string name, string unevaluatedValue)
156
ProjectMetadata
metadatum;
176
_metadata ??= new PropertyDictionary<
ProjectMetadata
>();
193
ProjectMetadata
IItemDefinition<
ProjectMetadata
>.SetMetadata(ProjectMetadataElement metadataElement, string evaluatedValue,
ProjectMetadata
predecessor)
195
_metadata ??= new PropertyDictionary<
ProjectMetadata
>();
197
ProjectMetadata
metadatum = new ProjectMetadata(this, metadataElement, evaluatedValue, predecessor);
243
ProjectMetadata
metadatum = GetMetadata(name);
Definition\ProjectMetadata.cs (7)
23
public class ProjectMetadata : IEquatable<
ProjectMetadata
>, IMetadatum
53
private
ProjectMetadata
_predecessor;
71
internal ProjectMetadata(IProjectMetadataParent parent, ProjectMetadataElement xml, string evaluatedValueEscaped,
ProjectMetadata
predecessor)
199
public
ProjectMetadata
Predecessor
278
bool IEquatable<
ProjectMetadata
>.Equals(
ProjectMetadata
other)
299
internal
ProjectMetadata
DeepClone()
Instance\ProjectInstance.cs (5)
974
if (projectItemDefinition.Metadata is IDictionary<string,
ProjectMetadata
> linkedMetadataDict)
976
metadata = new ImmutableElementCollectionConverter<
ProjectMetadata
, ProjectMetadataInstance>(
990
private static ProjectMetadataInstance ConvertCachedProjectMetadataToInstance(
ProjectMetadata
projectMetadata)
3400
if (item.DirectMetadata is IDictionary<string,
ProjectMetadata
> metadataDict)
3402
directMetadata = new ImmutablePropertyCollectionConverter<
ProjectMetadata
, ProjectMetadataInstance>(metadataDict, ConvertCachedProjectMetadataToInstance);
Instance\ProjectItemInstance.cs (1)
2178
foreach (
ProjectMetadata
metadatum in baseItem.Metadata)
Instance\ProjectMetadataInstance.cs (1)
84
internal ProjectMetadataInstance(
ProjectMetadata
metadatum)
Logging\BaseConsoleLogger.cs (1)
634
IItem<
ProjectMetadata
> iitem => iitem.Metadata?.Select(m => new KeyValuePair<string, string>(m.Name, m.EvaluatedValue)),
ObjectModelRemoting\DefinitionObjectsLinks\ProjectItemDefinitionLink.cs (3)
30
public abstract ICollection<
ProjectMetadata
> Metadata { get; }
35
public abstract
ProjectMetadata
GetMetadata(string name);
45
public abstract
ProjectMetadata
SetMetadataValue(string name, string unevaluatedValue);
ObjectModelRemoting\DefinitionObjectsLinks\ProjectItemLink.cs (4)
36
public abstract ICollection<
ProjectMetadata
> MetadataCollection { get; }
41
public abstract ICollection<
ProjectMetadata
> DirectMetadata { get; }
51
public abstract
ProjectMetadata
GetMetadata(string name);
61
public abstract
ProjectMetadata
SetMetadataValue(string name, string unevaluatedValue, bool propagateMetadataToSiblingItems);
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (1)
96
public abstract ICollection<
ProjectMetadata
> AllEvaluatedItemDefinitionMetadata { get; }
ObjectModelRemoting\DefinitionObjectsLinks\ProjectMetadataLink.cs (8)
13
/// Allow for creating a local representation to external object of type <see cref="
ProjectMetadata
"/>
25
/// Access to remote <see cref="
ProjectMetadata
.Xml"/>.
30
/// Access to remote <see cref="
ProjectMetadata
.EvaluatedValueEscaped"/>.
35
/// Access to remote <see cref="
ProjectMetadata
.Predecessor"/>.
37
public abstract
ProjectMetadata
Predecessor { get; }
41
/// At this point this is internal property for <see cref="
ProjectMetadata
"/>.
43
public static object GetParent(
ProjectMetadata
metadata)
51
public static string GetEvaluatedValueEscaped(
ProjectMetadata
metadata)
ObjectModelRemoting\LinkedObjectFactory.cs (1)
105
public
ProjectMetadata
Create(ProjectMetadataLink link, object parent = null)
Microsoft.Build.Engine.OM.UnitTests (93)
Construction\ConstructionEditing_Tests.cs (1)
2352
ProjectMetadata
metadatum = Helpers.GetFirst(project.Items).GetMetadata("m");
Definition\DefinitionEditing_Tests.cs (6)
760
ProjectMetadata
metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m");
1620
var
metadatum = project.AddItem("i", "i1")[0].SetMetadataValue("p", "v1");
1724
var
metadatum = project.AddItem("i", "i1")[0].SetMetadataValue("p", "v1");
1739
var
metadatum = project.AddItem("i", "i1")[0].SetMetadataValue("p", "v1");
1924
ProjectMetadata
metadatum1 = item.SetMetadataValue("m", "m1");
1925
ProjectMetadata
metadatum2 = item.SetMetadataValue("m", "m2");
Definition\EditingElementsReferencedByOrReferences_Tests.cs (1)
301
ProjectMetadata
metadata = item.GetMetadata("N");
Definition\ProjectItem_Tests.cs (9)
163
ProjectMetadata
m0 = item.GetMetadata("m0");
164
ProjectMetadata
m1 = item.GetMetadata("m1");
167
ProjectMetadata
idm0 = definition.GetMetadata("m0");
168
ProjectMetadata
idm1 = definition.GetMetadata("m1");
2157
var
metadata = project.GetItems("I").FirstOrDefault().SetMetadataValue("M", "$(P);@(Foo)", true);
2184
var
metadata = item.SetMetadataValue("M", "V", true);
2234
var
m1 = metadata.ElementAt(0);
2238
var
m2 = metadata.ElementAt(1);
2294
var
m1 = metadata.ElementAt(0);
Definition\ProjectItemDefinition_Tests.cs (5)
65
ProjectMetadata
metadatum = project.ItemDefinitions["i"].GetMetadata("m");
83
IEnumerable<
ProjectMetadata
> metadataCollection = itemDefinition.Metadata;
85
List<
ProjectMetadata
> metadataList = Helpers.MakeList(metadataCollection);
103
IEnumerable<
ProjectMetadata
> metadataCollection = project.ItemDefinitions["i"].Metadata;
105
List<
ProjectMetadata
> metadataList = Helpers.MakeList(metadataCollection);
Definition\ProjectMetadata_Tests.cs (15)
30
ProjectMetadata
metadatum = item.SetMetadataValue("m", "m1");
111
ProjectMetadata
metadatum = item.SetMetadataValue("m", "m1");
129
ProjectMetadata
metadatum = item.SetMetadataValue("m", "@(i)");
161
ProjectMetadata
metadatum = Helpers.GetFirst(project.GetItems("j")).GetMetadata("m1");
188
ProjectMetadata
metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m1");
214
ProjectMetadata
metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m1");
241
ProjectMetadata
metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m1");
273
ProjectMetadata
metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m1");
305
ProjectMetadata
metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m1");
337
ProjectMetadata
metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m1");
370
ProjectMetadata
metadatum = itemDefinition.GetMetadata("m1");
399
ProjectMetadata
metadatum = itemDefinition.GetMetadata("m1");
433
ProjectMetadata
metadatum = itemDefinition.GetMetadata("m1");
447
ProjectMetadata
metadata = project.AddItem("i", "i1")[0].SetMetadataValue("m", "m1");
470
ProjectMetadata
metadata = item.GetMetadata("m");
Definition\ProtectImports_Tests.cs (17)
334
ProjectMetadata
metadata = GetImportedMetadata(project);
391
ProjectMetadata
metadata = GetProjectMetadata(project);
427
ProjectMetadata
metadata = GetNonOverridableMetadata(project);
469
ProjectMetadata
metadata = GetOverridableMetadata(project);
487
ProjectMetadata
metadata = item.GetMetadata(OverridableMetadataName);
538
private
ProjectMetadata
GetImportedMetadata(Project project)
541
IEnumerable<
ProjectMetadata
> metadatum = item.Metadata.Where(m => m.Name == ImportedMetadataName);
544
ProjectMetadata
metadata = metadatum.First();
555
private
ProjectMetadata
GetNonOverridableMetadata(Project project)
558
IEnumerable<
ProjectMetadata
> metadatum = item.Metadata.Where(m => m.Name == NonOverridableMetadataName);
561
ProjectMetadata
metadata = metadatum.First();
572
private
ProjectMetadata
GetOverridableMetadata(Project project)
575
IEnumerable<
ProjectMetadata
> metadatum = item.Metadata.Where(m => m.Name == OverridableMetadataName);
578
ProjectMetadata
metadata = metadatum.First();
645
private
ProjectMetadata
GetProjectMetadata(Project project)
648
IEnumerable<
ProjectMetadata
> metadatum = item.Metadata.Where(m => m.Name == ProjectMetadataName);
651
ProjectMetadata
metadata = metadatum.First();
ObjectModelRemoting\Helpers\ViewValidation.cs (1)
255
if (VerifyCheckType<
ProjectMetadata
>(view, real, context, Verify))
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (9)
43
var
md = result.GetMetadata(m.Key);
131
public static void Verify(
ProjectMetadata
view,
ProjectMetadata
real, ValidationContext context)
184
foreach (
var
rm in real.Metadata)
190
var
grm = real.GetMetadata(rm.Name);
191
var
gvm = view.GetMetadata(rm.Name);
229
foreach (
var
rm in real.Metadata)
235
var
grm = real.GetMetadata(rm.Name);
236
var
gvm = view.GetMetadata(rm.Name);
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectItemDefinitionLink.cs (9)
23
public ICollection<MockProjectMetadataLinkRemoter> Metadata => this.OwningCollection.ExportCollection<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Source.Metadata);
25
=> this.OwningCollection.Export<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Source.GetMetadata(name));
28
=> this.OwningCollection.Export<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Source.SetMetadataValue(name, unevaluatedValue));
47
public override ICollection<
ProjectMetadata
> Metadata
48
=> this.Linker.ImportCollection<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Proxy.Metadata);
49
public override
ProjectMetadata
GetMetadata(string name)
50
=> this.Linker.Import<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Proxy.GetMetadata(name));
52
public override
ProjectMetadata
SetMetadataValue(string name, string unevaluatedValue)
53
=> this.Linker.Import<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Proxy.SetMetadataValue(name, unevaluatedValue));
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectItemLink.cs (12)
25
public ICollection<MockProjectMetadataLinkRemoter> MetadataCollection => this.OwningCollection.ExportCollection<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Source.Metadata);
26
public ICollection<MockProjectMetadataLinkRemoter> DirectMetadata => this.OwningCollection.ExportCollection<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Source.DirectMetadata);
29
=> this.OwningCollection.Export<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Source.GetMetadata(name));
32
=> this.OwningCollection.Export<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Source.SetMetadataValue(name, unevaluatedValue, propagateMetadataToSiblingItems));
56
public override ICollection<
ProjectMetadata
> MetadataCollection
57
=> this.Linker.ImportCollection<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Proxy.MetadataCollection);
58
public override ICollection<
ProjectMetadata
> DirectMetadata
59
=> this.Linker.ImportCollection<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Proxy.DirectMetadata);
61
public override
ProjectMetadata
GetMetadata(string name)
62
=> this.Linker.Import<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Proxy.GetMetadata(name));
64
public override
ProjectMetadata
SetMetadataValue(string name, string unevaluatedValue, bool propagateMetadataToSiblingItems)
65
=> this.Linker.Import<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Proxy.SetMetadataValue(name, unevaluatedValue, propagateMetadataToSiblingItems));
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectLink.cs (3)
62
=> this.OwningCollection.ExportCollection<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Source.AllEvaluatedItemDefinitionMetadata);
160
public override ICollection<
ProjectMetadata
> AllEvaluatedItemDefinitionMetadata
161
=> this.Linker.ImportCollection<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Proxy.AllEvaluatedItemDefinitionMetadata);
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectMetadataLink.cs (5)
12
internal sealed class MockProjectMetadataLinkRemoter : MockLinkRemoter<
ProjectMetadata
>
14
public override
ProjectMetadata
CreateLinkedObject(IImportHolder holder)
43
public MockProjectMetadataLinkRemoter Predecessor => this.OwningCollection.Export<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Source.Predecessor);
82
public override
ProjectMetadata
Predecessor => this.Linker.Import<
ProjectMetadata
, MockProjectMetadataLinkRemoter>(this.Proxy.Predecessor);
Microsoft.Build.Engine.UnitTests (12)
Definition\ItemDefinitionGroup_Tests.cs (2)
1884
private bool ContainsMetadata(IEnumerable<
ProjectMetadata
> metadata, string name, string value)
1886
foreach (
ProjectMetadata
metadataEntry in metadata)
Evaluation\Evaluator_Tests.cs (8)
1562
ProjectMetadata
metadatum = project.ItemDefinitions["i"].GetMetadata("m");
1591
ProjectMetadata
metadatum = item.SetMetadataValue("m", "m2");
1621
ProjectMetadata
metadatum = project.GetItems("i").ElementAt(0).GetMetadata("m");
1660
ProjectMetadata
metadatum = project.GetItems("i").ElementAt(1).GetMetadata("m");
1692
ProjectMetadata
metadatum = project.GetItems("i").ElementAt(0).GetMetadata("m");
1726
ProjectMetadata
metadatum = item.GetMetadata("m");
1789
ProjectMetadata
metadatum = project.GetItems("i").ElementAt(0).GetMetadata("m");
1883
ProjectMetadata
predecessor = project.GetItems("i").ElementAt(0).GetMetadata("m").Predecessor;
Parser_Tests.cs (2)
582
var
metadatam = projectItem.GetMetadata("m");
594
var
metadatan = projectItem.GetMetadata("n");
MSBuild (1)
JsonOutputFormatter.cs (1)
99
foreach (
ProjectMetadata
metadatum in item.Metadata)