Implemented interface member:
method
GetMetadata
Microsoft.Build.Framework.ITaskItem.GetMetadata(System.String)
45 references to GetMetadata
Microsoft.Build.Engine.OM.UnitTests (5)
Instance\ProjectItemInstance_Tests.cs (5)
522
Assert.Equal(";x86;", taskItem.
GetMetadata
("m0"));
523
Assert.Equal("foo.extension", taskItem.
GetMetadata
("m1"));
524
Assert.Equal(";foo.extension;", taskItem.
GetMetadata
("m2"));
525
Assert.Equal("v1", taskItem.
GetMetadata
("m3"));
526
Assert.Equal(";x86;", taskItem.
GetMetadata
("m4"));
Microsoft.Build.Tasks.Core (7)
AssemblyDependency\ReferenceTable.cs (5)
2695
bool hasImplementationFile = referenceItem.
GetMetadata
(ItemMetadataNames.winmdImplmentationFile).Length > 0;
2696
bool hasImageRuntime = referenceItem.
GetMetadata
(ItemMetadataNames.imageRuntime).Length > 0;
2697
bool hasWinMDFile = referenceItem.
GetMetadata
(ItemMetadataNames.winMDFile).Length > 0;
2791
if (referenceItem.
GetMetadata
(ItemMetadataNames.msbuildReferenceSourceTarget).Length == 0)
2796
if (referenceItem.
GetMetadata
(ItemMetadataNames.msbuildReferenceSourceTarget).Equals("ProjectReference"))
GetSDKReferenceFiles.cs (2)
458
if (outputItem.
GetMetadata
(ItemMetadataNames.msbuildReferenceSourceTarget).Length == 0)
540
if (outputItem.
GetMetadata
(ItemMetadataNames.msbuildReferenceSourceTarget).Length == 0)
Microsoft.Build.Utilities.UnitTests (31)
TaskItem_Tests.cs (31)
37
to.
GetMetadata
("Dog").ShouldBe("Bingo");
38
to.
GetMetadata
("Cat").ShouldBe("Morris");
42
to.
GetMetadata
("Cat").ShouldBe("");
45
to.
GetMetadata
(FileUtilities.ItemSpecModifiers.Filename).ShouldBe("Monkey");
46
to.
GetMetadata
(FileUtilities.ItemSpecModifiers.Extension).ShouldBe(".txt");
47
to.
GetMetadata
(FileUtilities.ItemSpecModifiers.RelativeDir).ShouldBe(string.Empty);
68
to.
GetMetadata
("Sponge").ShouldBe("Bob"); // Metadata not in source are preserved.
69
to.
GetMetadata
("Dog").ShouldBe("Harriet"); // Metadata present on destination are not overwritten.
70
to.
GetMetadata
("Cat").ShouldBe("Mike");
71
to.
GetMetadata
("Bird").ShouldBe("Big");
124
t.
GetMetadata
(FileUtilities.ItemSpecModifiers.Filename).ShouldBe("bamboo");
125
t.
GetMetadata
(FileUtilities.ItemSpecModifiers.Extension).ShouldBe(".baz");
126
t.
GetMetadata
("CUSTOM").ShouldBe("hello");
185
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.FullPath).ShouldBe(
196
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.RootDir).ShouldBe(Path.GetPathRoot(from.
GetMetadata
(FileUtilities.ItemSpecModifiers.FullPath)));
204
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.Filename).ShouldBe("Monkey");
212
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.Extension).ShouldBe(".txt");
220
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.RelativeDir).Length.ShouldBe(0);
228
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.Directory).ShouldBe(NativeMethodsShared.IsWindows ? @"subdir\" : "subdir/");
236
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.Directory).ShouldBe(@"subdir\");
245
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.RecursiveDir).Length.ShouldBe(0);
253
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.Identity).ShouldBe("Monkey.txt");
262
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.ModifiedTime).Length.ShouldBeGreaterThan(0);
264
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.CreatedTime).Length.ShouldBeGreaterThan(0);
266
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.AccessedTime).Length.ShouldBeGreaterThan(0);
270
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.ModifiedTime).Length.ShouldBe(0);
272
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.CreatedTime).Length.ShouldBe(0);
274
from.
GetMetadata
(FileUtilities.ItemSpecModifiers.AccessedTime).Length.ShouldBe(0);
312
item.
GetMetadata
("m").ShouldBe(string.Empty);
324
item.
GetMetadata
("m").ShouldBe(string.Empty);
Microsoft.DotNet.Build.Tasks.Packaging (1)
CreateTrimDependencyGroups.cs (1)
141
item.SetMetadata("CopiedFromTargetFramework", item.
GetMetadata
("TargetFramework"));
Microsoft.Extensions.ApiDescription.Client.Tests (1)
MetadataSerializerTest.cs (1)
82
Assert.Equal(value, item.
GetMetadata
(key));