167 references to ItemSpecModifiers
Microsoft.Build (77)
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
706
outputItemFromTarget.SetMetadata(ItemMetadataNames.msbuildSourceProjectFile, projects[i].GetMetadata(FileUtilities.
ItemSpecModifiers
.FullPath));
Construction\ProjectMetadataElement.cs (1)
106
ErrorUtilities.VerifyThrowArgument(!FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name);
Definition\BuiltInMetadata.cs (5)
27
{ return FileUtilities.
ItemSpecModifiers
.All.Length; }
37
{ return FileUtilities.
ItemSpecModifiers
.All; }
76
Debug.Assert(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(name));
79
if (String.Equals(name, FileUtilities.
ItemSpecModifiers
.RecursiveDir, StringComparison.OrdinalIgnoreCase))
85
value = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, evaluatedIncludeEscaped, definingProjectEscaped, name, ref fullPath);
Definition\ProjectItem.cs (5)
306
{ return Metadata.Count + FileUtilities.
ItemSpecModifiers
.All.Length; }
461
if (FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(name))
586
ErrorUtilities.VerifyThrowArgument(!FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name);
644
ErrorUtilities.VerifyThrowArgument(!FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name);
860
if (FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(name))
Definition\ProjectItemDefinition.cs (1)
154
ErrorUtilities.VerifyThrowArgument(!FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name);
Evaluation\Conditionals\Scanner.cs (1)
477
bool isItemSpecModifier = FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(expression);
Evaluation\Expander.cs (7)
1091
bool isBuiltInMetadata = FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(metadataName);
2260
if (FileUtilities.
ItemSpecModifiers
.IsDerivableItemSpecModifier(functionName))
2365
string definingProjectEscaped = item.Value.GetMetadataValueEscaped(FileUtilities.
ItemSpecModifiers
.DefiningProjectFullPath);
2367
result = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(directoryToUse, item.Key, definingProjectEscaped, functionName);
3060
if (FileUtilities.
ItemSpecModifiers
.IsDerivableItemSpecModifier(name))
3066
string definingProjectEscaped = _sourceOfMetadata.GetMetadataValueEscaped(FileUtilities.
ItemSpecModifiers
.DefiningProjectFullPath);
3068
value = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(directoryToUse, _itemSpec, definingProjectEscaped, name);
Evaluation\ProjectParser.cs (2)
379
if (FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(name) || XMakeElements.ReservedItemNames.Contains(name))
400
ProjectErrorUtilities.VerifyThrowInvalidProject(!FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(element.Name), element.Location, "ItemSpecModifierCannotBeCustomMetadata", element.Name);
Instance\ProjectItemInstance.cs (6)
947
List<string> names = new List<string>(capacity: metadataCollection.Count + FileUtilities.
ItemSpecModifiers
.All.Length);
954
names.AddRange(FileUtilities.
ItemSpecModifiers
.All);
1692
FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(name) ||
1880
if (!FileUtilities.
ItemSpecModifiers
.IsDerivableItemSpecModifier(name))
1894
.Where(item => !FileUtilities.
ItemSpecModifiers
.IsDerivableItemSpecModifier(item.Key))
1930
if (FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(name))
Instance\ProjectMetadataInstance.cs (1)
72
ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(name) && !FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(name), "OM_ReservedName", name);
Modifiers.cs (37)
110
if (name == FileUtilities.
ItemSpecModifiers
.RootDir)
126
if (name == FileUtilities.
ItemSpecModifiers
.FullPath)
130
if (name == FileUtilities.
ItemSpecModifiers
.Filename)
138
if (name == FileUtilities.
ItemSpecModifiers
.Identity)
153
if (name == FileUtilities.
ItemSpecModifiers
.Directory)
161
if (name == FileUtilities.
ItemSpecModifiers
.Extension)
176
if (name == FileUtilities.
ItemSpecModifiers
.CreatedTime)
184
if (name == FileUtilities.
ItemSpecModifiers
.RelativeDir)
200
if (name == FileUtilities.
ItemSpecModifiers
.AccessedTime)
208
if (name == FileUtilities.
ItemSpecModifiers
.ModifiedTime)
216
if (name == FileUtilities.
ItemSpecModifiers
.RecursiveDir)
256
if (name == FileUtilities.
ItemSpecModifiers
.DefiningProjectName)
262
if (name == FileUtilities.
ItemSpecModifiers
.DefiningProjectFullPath)
274
if (name == FileUtilities.
ItemSpecModifiers
.DefiningProjectDirectory)
282
if (name == FileUtilities.
ItemSpecModifiers
.DefiningProjectExtension)
392
if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.FullPath, StringComparison.OrdinalIgnoreCase))
409
else if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.RootDir, StringComparison.OrdinalIgnoreCase))
411
GetItemSpecModifier(currentDirectory, itemSpec, definingProjectEscaped,
ItemSpecModifiers
.FullPath, ref fullPath);
425
else if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.Filename, StringComparison.OrdinalIgnoreCase))
440
else if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.Extension, StringComparison.OrdinalIgnoreCase))
454
else if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.RelativeDir, StringComparison.OrdinalIgnoreCase))
458
else if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.Directory, StringComparison.OrdinalIgnoreCase))
460
GetItemSpecModifier(currentDirectory, itemSpec, definingProjectEscaped,
ItemSpecModifiers
.FullPath, ref fullPath);
495
else if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.RecursiveDir, StringComparison.OrdinalIgnoreCase))
500
else if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.Identity, StringComparison.OrdinalIgnoreCase))
504
else if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.ModifiedTime, StringComparison.OrdinalIgnoreCase))
522
else if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.CreatedTime, StringComparison.OrdinalIgnoreCase))
538
else if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.AccessedTime, StringComparison.OrdinalIgnoreCase))
563
if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.DefiningProjectDirectory, StringComparison.OrdinalIgnoreCase))
567
GetItemSpecModifier(currentDirectory, definingProjectEscaped, null,
ItemSpecModifiers
.RootDir),
568
GetItemSpecModifier(currentDirectory, definingProjectEscaped, null,
ItemSpecModifiers
.Directory));
574
if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.DefiningProjectFullPath, StringComparison.OrdinalIgnoreCase))
576
additionalModifier =
ItemSpecModifiers
.FullPath;
578
else if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.DefiningProjectName, StringComparison.OrdinalIgnoreCase))
580
additionalModifier =
ItemSpecModifiers
.Filename;
582
else if (string.Equals(modifier, FileUtilities.
ItemSpecModifiers
.DefiningProjectExtension, StringComparison.OrdinalIgnoreCase))
584
additionalModifier =
ItemSpecModifiers
.Extension;
TaskParameter.cs (10)
298
escapedDefiningProject = copyFromAsITaskItem2.GetMetadataValueEscaped(FileUtilities.
ItemSpecModifiers
.DefiningProjectFullPath);
319
escapedDefiningProject = EscapingUtilities.EscapeWithCaching(copyFrom.GetMetadata(FileUtilities.
ItemSpecModifiers
.DefiningProjectFullPath));
413
escapedDefiningProject = wrappedItemAsITaskItem2.GetMetadataValueEscaped(FileUtilities.
ItemSpecModifiers
.DefiningProjectFullPath);
422
escapedDefiningProject = EscapingUtilities.EscapeWithCaching(wrappedItem.GetMetadata(FileUtilities.
ItemSpecModifiers
.DefiningProjectFullPath));
794
metadataNames.AddRange(FileUtilities.
ItemSpecModifiers
.All);
810
return count + FileUtilities.
ItemSpecModifiers
.All.Length;
852
ErrorUtilities.VerifyThrowArgument(!FileUtilities.
ItemSpecModifiers
.IsDerivableItemSpecModifier(metadataName), "Shared.CannotChangeItemSpecModifiers", metadataName);
866
ErrorUtilities.VerifyThrowArgument(!FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(metadataName), "Shared.CannotChangeItemSpecModifiers", metadataName);
959
if (FileUtilities.
ItemSpecModifiers
.IsDerivableItemSpecModifier(metadataName))
963
metadataValue = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(null, _escapedItemSpec, _escapedDefiningProject, metadataName, ref _fullPath);
Microsoft.Build.Engine.UnitTests (90)
FileUtilities_Tests.cs (84)
35
string modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, "foo", String.Empty, FileUtilities.
ItemSpecModifiers
.RecursiveDir, ref cache);
39
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, "foo", String.Empty, FileUtilities.
ItemSpecModifiers
.ModifiedTime, ref cache);
43
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, @"foo\goo", String.Empty, FileUtilities.
ItemSpecModifiers
.RelativeDir, ref cache);
47
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, @"foo\goo", String.Empty, FileUtilities.
ItemSpecModifiers
.RelativeDir, ref cache);
53
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, itemSpec, String.Empty, FileUtilities.
ItemSpecModifiers
.FullPath, ref cache);
57
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, itemSpec, String.Empty, FileUtilities.
ItemSpecModifiers
.RootDir, ref cache);
60
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, itemSpec, String.Empty, FileUtilities.
ItemSpecModifiers
.Filename, ref cache);
63
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, itemSpec, String.Empty, FileUtilities.
ItemSpecModifiers
.Extension, ref cache);
66
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, itemSpec, String.Empty, FileUtilities.
ItemSpecModifiers
.Directory, ref cache);
69
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, itemSpec, String.Empty, FileUtilities.
ItemSpecModifiers
.Identity, ref cache);
74
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, itemSpec, projectPath, FileUtilities.
ItemSpecModifiers
.DefiningProjectDirectory, ref cache);
77
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, itemSpec, projectPath, FileUtilities.
ItemSpecModifiers
.DefiningProjectExtension, ref cache);
80
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, itemSpec, projectPath, FileUtilities.
ItemSpecModifiers
.DefiningProjectFullPath, ref cache);
83
modifier = FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, itemSpec, projectPath, FileUtilities.
ItemSpecModifiers
.DefiningProjectName, ref cache);
178
FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, @"http://www.microsoft.com", String.Empty, FileUtilities.
ItemSpecModifiers
.RootDir, ref cache);
342
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("FullPath")); // "test 1"
343
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("RootDir")); // "test 2"
344
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Filename")); // "test 3"
345
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Extension")); // "test 4"
346
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("RelativeDir")); // "test 5"
347
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Directory")); // "test 6"
348
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("RecursiveDir")); // "test 7"
349
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Identity")); // "test 8"
350
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("ModifiedTime")); // "test 9"
351
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("CreatedTime")); // "test 10"
352
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("AccessedTime")); // "test 11"
355
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("fullPath")); // "test 21"
356
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("rootDir")); // "test 22"
357
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("filename")); // "test 23"
358
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("extension")); // "test 24"
359
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("relativeDir")); // "test 25"
360
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("directory")); // "test 26"
361
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("recursiveDir")); // "test 27"
362
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("identity")); // "test 28"
363
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("modifiedTime")); // "test 29"
364
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("createdTime")); // "test 30"
365
Assert.True(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("accessedTime")); // "test 31"
369
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("rootxxx")); // "test 41"
370
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Rootxxx")); // "test 42"
371
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("xxxxxxx")); // "test 43"
373
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("filexxxx")); // "test 44"
374
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Filexxxx")); // "test 45"
375
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("idenxxxx")); // "test 46"
376
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Idenxxxx")); // "test 47"
377
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("xxxxxxxx")); // "test 48"
379
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("extenxxxx")); // "test 49"
380
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Extenxxxx")); // "test 50"
381
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("direcxxxx")); // "test 51"
382
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Direcxxxx")); // "test 52"
383
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("xxxxxxxxx")); // "test 53"
385
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("xxxxxxxxxx")); // "test 54"
387
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("relativexxx")); // "test 55"
388
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Relativexxx")); // "test 56"
389
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("createdxxxx")); // "test 57"
390
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Createdxxxx")); // "test 58"
391
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("xxxxxxxxxxx")); // "test 59"
393
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("recursivexxx")); // "test 60"
394
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Recursivexxx")); // "test 61"
395
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("accessedxxxx")); // "test 62"
396
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Accessedxxxx")); // "test 63"
397
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("modifiedxxxx")); // "test 64"
398
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("Modifiedxxxx")); // "test 65"
399
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier("xxxxxxxxxxxx")); // "test 66"
401
Assert.False(FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(null)); // "test 67"
407
Assert.True(FileUtilities.
ItemSpecModifiers
.IsDerivableItemSpecModifier("Filename"));
408
Assert.False(FileUtilities.
ItemSpecModifiers
.IsDerivableItemSpecModifier("RecursiveDir"));
409
Assert.False(FileUtilities.
ItemSpecModifiers
.IsDerivableItemSpecModifier("recursivedir"));
444
Assert.Equal(@"c:\", FileUtilities.
ItemSpecModifiers
.GetItemSpecModifier(currentDirectory, fullPath, String.Empty, FileUtilities.
ItemSpecModifiers
.RootDir, ref cache));
Instance\TaskItem_Tests.cs (2)
64
Assert.Equal(item.GetMetadata(FileUtilities.
ItemSpecModifiers
.DefiningProjectFullPath), deserializedItem.GetMetadata(FileUtilities.
ItemSpecModifiers
.DefiningProjectFullPath));
TestComparers\TaskItemComparer.cs (4)
53
if (!FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(metadataName) ||
54
FileUtilities.
ItemSpecModifiers
.IsDerivableItemSpecModifier(metadataName))
65
if (!FileUtilities.
ItemSpecModifiers
.IsItemSpecModifier(metadataName) ||
66
FileUtilities.
ItemSpecModifiers
.IsDerivableItemSpecModifier(metadataName))