17 references to AddMetadata
Microsoft.Build (3)
Construction\ProjectItemGroupElement.cs (1)
144
newItem.
AddMetadata
(metadatum.Key, metadatum.Value);
Definition\ProjectItem.cs (1)
604
ProjectMetadataElement metadatumXml = _xml.
AddMetadata
(name, unevaluatedValue);
Instance\ProjectItemInstance.cs (1)
685
item.
AddMetadata
(metadataInstance.Name, metadataInstance.EvaluatedValue);
Microsoft.Build.Engine.OM.UnitTests (14)
Construction\ConstructionEditing_Tests.cs (4)
2558
var element = ProjectRootElement.Create().AddItem("i", "i1").
AddMetadata
("m", "M1");
2841
var element = ProjectRootElement.Create().AddTarget("t").AddItemGroup().AddItem("i", "i1").
AddMetadata
("m", "m1");
2905
var element = ProjectRootElement.Create().AddItem("i", "i1").
AddMetadata
("m", "M1");
3100
var element = ProjectRootElement.Create().AddTarget("t").AddItemGroup().AddItem("i", "i1").
AddMetadata
("m", "m1");
Construction\ProjectRootElement_Tests.cs (1)
1169
item.
AddMetadata
("Some", "Value");
Definition\DefinitionEditing_Tests.cs (5)
587
item1.
AddMetadata
("m", "m1");
674
itemElement.
AddMetadata
("m", "m0");
795
itemElement.
AddMetadata
("m", "m1");
1395
itemElement.
AddMetadata
("m", "m1");
2504
item1.
AddMetadata
("m", "m1");
Definition\ProjectItem_Tests.cs (1)
1893
xml.AddItem("i", "i1").
AddMetadata
("m", "m2");
Definition\ProjectMetadata_Tests.cs (1)
463
itemXml.
AddMetadata
("m", "m0");
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (2)
352
var metadata = item1.AddNewChaildWithVerify<ProjectMetadataElement>(ObjectType.View, "metadata", (p, n) => p.
AddMetadata
(n, "value"), (md, n) => md.Name == n);
672
item.Add2NewChildrenWithVerify<ProjectMetadataElement>("mshort", (id, n) => id.
AddMetadata
(n, $"value{n}"), (md, n) => md.Name == n, out var mdShort1, out var mdShort2);