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