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