66 references to EscapingUtilities
Microsoft.Build.Tasks.Core (22)
AssignProjectConfiguration.cs (1)
226
projectRef.SetMetadata("GlobalPropertiesToRemove",
EscapingUtilities
.Escape(globalPropertiesToRemove + "Configuration;Platform"));
AssignTargetPath.cs (1)
122
AssignedFiles[i].SetMetadata(ItemMetadataNames.targetPath,
EscapingUtilities
.Escape(targetPath));
CombineTargetFrameworkInfoProperties.cs (1)
49
new("TargetFramework", new XAttribute("Name",
EscapingUtilities
.Escape(RootElementName))) :
ConvertToAbsolutePath.cs (1)
64
path.ItemSpec =
EscapingUtilities
.Escape(path.GetMetadata("FullPath"));
Copy.cs (3)
740
DestinationFiles[i] = new TaskItem(
EscapingUtilities
.Escape(destinationFile));
782
var item = new TaskItem(
EscapingUtilities
.Escape(sourceFile));
786
item = new TaskItem(
EscapingUtilities
.Escape(destinationFile));
CreateItem.cs (2)
164
EscapingUtilities
.UnescapeAll(i.ItemSpec),
174
EscapingUtilities
.UnescapeAll(i.ItemSpec),
Exec.cs (1)
401
_nonEmptyOutput.Add(new TaskItem(
EscapingUtilities
.Escape(trimmedTextLine)));
FileIO\ReadLinesFromFile.cs (1)
61
nonEmptyLines.Add(new TaskItem(
EscapingUtilities
.Escape(trimmedTextLine)));
FileUtilities.cs (2)
759
fileSpec = FixFilePath(
EscapingUtilities
.UnescapeAll(fileSpec));
762
string fullPath =
EscapingUtilities
.Escape(NormalizePath(Path.Combine(currentDirectory, fileSpec)));
GenerateResource.cs (1)
2706
string escapedOutputFile =
EscapingUtilities
.Escape(currentOutputFile);
ListOperators\FindUnderPath.cs (1)
100
item.ItemSpec =
EscapingUtilities
.Escape(fullPath);
Modifiers.cs (3)
508
string unescapedItemSpec =
EscapingUtilities
.UnescapeAll(itemSpec);
526
string unescapedItemSpec =
EscapingUtilities
.UnescapeAll(itemSpec);
542
string unescapedItemSpec =
EscapingUtilities
.UnescapeAll(itemSpec);
PropertyParser.cs (2)
107
string propertyValue =
EscapingUtilities
.Escape(propertyNameValueString.Substring(indexOfEqualsSign + 1).Trim());
150
string propertyValue =
EscapingUtilities
.Escape(propertyNameValueString.Trim());
ResGen.cs (1)
488
outputFiles[i] = new TaskItem(Path.ChangeExtension(
EscapingUtilities
.Escape(inputFiles[i].ItemSpec), ".resources"));
XmlPeek.cs (1)
153
Result[i++] = new TaskItem(
EscapingUtilities
.Escape(item));
Microsoft.Build.Tasks.UnitTests (44)
Copy_Tests.cs (1)
1920
string sourceFile =
EscapingUtilities
.UnescapeAll(sourceFileEscaped);
EscapingUtilities_Tests.cs (42)
18
Assert.Equal("",
EscapingUtilities
.UnescapeAll(""));
19
Assert.Equal("foo",
EscapingUtilities
.UnescapeAll("foo"));
20
Assert.Equal("foo space",
EscapingUtilities
.UnescapeAll("foo%20space"));
21
Assert.Equal("foo2;",
EscapingUtilities
.UnescapeAll("foo2%3B"));
22
Assert.Equal(";foo3",
EscapingUtilities
.UnescapeAll("%3bfoo3"));
23
Assert.Equal(";",
EscapingUtilities
.UnescapeAll("%3b"));
24
Assert.Equal(";;;;;",
EscapingUtilities
.UnescapeAll("%3b%3B;%3b%3B"));
25
Assert.Equal("%3B",
EscapingUtilities
.UnescapeAll("%253B"));
26
Assert.Equal("===%ZZ %%%===",
EscapingUtilities
.UnescapeAll("===%ZZ%20%%%==="));
27
Assert.Equal("hello; escaping% how( are) you?",
EscapingUtilities
.UnescapeAll("hello%3B escaping%25 how%28 are%29 you%3f"));
29
Assert.Equal("%*?*%*",
EscapingUtilities
.UnescapeAll("%25*?*%25*"));
30
Assert.Equal("%*?*%*",
EscapingUtilities
.UnescapeAll("%25%2a%3f%2a%25%2a"));
32
Assert.Equal("*Star*craft or *War*cr@ft??",
EscapingUtilities
.UnescapeAll("%2aStar%2Acraft%20or %2aWar%2Acr%40ft%3f%3F"));
40
Assert.Equal("%2a",
EscapingUtilities
.Escape("*"));
41
Assert.Equal("%3f",
EscapingUtilities
.Escape("?"));
42
Assert.Equal("#%2a%3f%2a#%2a",
EscapingUtilities
.Escape("#*?*#*"));
43
Assert.Equal("%25%2a%3f%2a%25%2a",
EscapingUtilities
.Escape("%*?*%*"));
52
Assert.Equal(text,
EscapingUtilities
.UnescapeAll(
EscapingUtilities
.Escape(text)));
55
Assert.Equal(text,
EscapingUtilities
.UnescapeAll(
EscapingUtilities
.Escape(text)));
58
Assert.Equal(text,
EscapingUtilities
.UnescapeAll(
EscapingUtilities
.Escape(text)));
67
Assert.Equal(text,
EscapingUtilities
.Escape(
EscapingUtilities
.UnescapeAll(text)));
70
Assert.Equal(text,
EscapingUtilities
.Escape(
EscapingUtilities
.UnescapeAll(text)));
73
Assert.Equal(text,
EscapingUtilities
.Escape(
EscapingUtilities
.UnescapeAll(text)));
79
Assert.False(
EscapingUtilities
.ContainsEscapedWildcards("NoStarOrQMark"));
80
Assert.False(
EscapingUtilities
.ContainsEscapedWildcards("%"));
81
Assert.False(
EscapingUtilities
.ContainsEscapedWildcards("%%"));
82
Assert.False(
EscapingUtilities
.ContainsEscapedWildcards("%2"));
83
Assert.False(
EscapingUtilities
.ContainsEscapedWildcards("%4"));
84
Assert.False(
EscapingUtilities
.ContainsEscapedWildcards("%3A"));
85
Assert.False(
EscapingUtilities
.ContainsEscapedWildcards("%2B"));
86
Assert.True(
EscapingUtilities
.ContainsEscapedWildcards("%2a"));
87
Assert.True(
EscapingUtilities
.ContainsEscapedWildcards("%2A"));
88
Assert.True(
EscapingUtilities
.ContainsEscapedWildcards("%3F"));
89
Assert.True(
EscapingUtilities
.ContainsEscapedWildcards("%3f"));
90
Assert.True(
EscapingUtilities
.ContainsEscapedWildcards("%%3f"));
91
Assert.True(
EscapingUtilities
.ContainsEscapedWildcards("%3%3f"));
FindUnderPath_Tests.cs (1)
78
t.Files = new ITaskItem[] { new TaskItem(
EscapingUtilities
.Escape(testFile.Name)),