101 references to Escape
Microsoft.Build (84)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (6)
1413newItem = new ProjectItemInstance(_projectInstance, outputTargetName, EscapingUtilities.Escape(output.ItemSpec), parameterLocationEscaped); 1421yield return new KeyValuePair<string, string>((string)de.Key, EscapingUtilities.Escape((string)de.Value)); 1469joinedOutputs.Append(EscapingUtilities.Escape(output.ItemSpec)); 1521_batchBucket.Lookup.AddNewItem(new ProjectItemInstance(_projectInstance, outputTargetName, EscapingUtilities.Escape(output), EscapingUtilities.Escape(parameterLocation.File))); 1557joinedOutputs.Append(EscapingUtilities.Escape(output));
Construction\Solution\SolutionProjectGenerator.cs (42)
312string escapedSolutionConfigurationContents = EscapingUtilities.Escape(solutionConfigurationContents.ToString()); 330text = EscapingUtilities.Escape(text); 338task.SetParameter("Code", EscapingUtilities.Escape(code)); 343task.SetParameter("HelpKeyword", EscapingUtilities.Escape(helpKeyword)); 381return EscapingUtilities.Escape(fullPathToProject + ".metaproj"); 511msbuildTask.SetParameter("Projects", EscapingUtilities.Escape(projectPath)); 521EscapingUtilities.Escape(configurationName), 522EscapingUtilities.Escape(platformName)); 589text = EscapingUtilities.Escape(text); 597task.SetParameter("Code", EscapingUtilities.Escape(code)); 602task.SetParameter("HelpKeyword", EscapingUtilities.Escape(helpKeyword)); 620EscapingUtilities.Escape(configuration.ConfigurationName), 621EscapingUtilities.Escape(configuration.PlatformName)); 951string escapedSolutionFile = EscapingUtilities.Escape(Path.GetFileName(_solutionFile.FullPath)); 952string escapedSolutionDirectory = EscapingUtilities.Escape(_solutionFile.SolutionFileDirectory); 1062item = projectInstance.AddItem("ProjectReference", EscapingUtilities.Escape(projectToAdd.AbsolutePath), null); 1347AddProjectBuildTask(traversalProject, projectConfiguration, target, targetName, EscapingUtilities.Escape(project.AbsolutePath), String.Empty, outputItem); 1462conditionDescribingValidConfigurations.AppendFormat(CultureInfo.InvariantCulture, "('$(AspNetConfiguration)' == '{0}')", EscapingUtilities.Escape(configurationName)); 1678if (!traversalProject.EvaluateCondition(String.Format(CultureInfo.InvariantCulture, " '$(AspNetConfiguration)' == '{0}' ", EscapingUtilities.Escape(configurationName)))) 1685metaprojectInstance.SetProperty(GenerateSafePropertyName(project, "AspNetVirtualPath"), EscapingUtilities.Escape(aspNetCompilerParameters.aspNetVirtualPath)); 1686metaprojectInstance.SetProperty(GenerateSafePropertyName(project, "AspNetPhysicalPath"), EscapingUtilities.Escape(aspNetCompilerParameters.aspNetPhysicalPath)); 1687metaprojectInstance.SetProperty(GenerateSafePropertyName(project, "AspNetTargetPath"), EscapingUtilities.Escape(aspNetCompilerParameters.aspNetTargetPath)); 1688metaprojectInstance.SetProperty(GenerateSafePropertyName(project, "AspNetForce"), EscapingUtilities.Escape(aspNetCompilerParameters.aspNetForce)); 1689metaprojectInstance.SetProperty(GenerateSafePropertyName(project, "AspNetUpdateable"), EscapingUtilities.Escape(aspNetCompilerParameters.aspNetUpdateable)); 1690metaprojectInstance.SetProperty(GenerateSafePropertyName(project, "AspNetDebug"), EscapingUtilities.Escape(aspNetCompilerParameters.aspNetDebug)); 1691metaprojectInstance.SetProperty(GenerateSafePropertyName(project, "AspNetKeyFile"), EscapingUtilities.Escape(aspNetCompilerParameters.aspNetKeyFile)); 1692metaprojectInstance.SetProperty(GenerateSafePropertyName(project, "AspNetKeyContainer"), EscapingUtilities.Escape(aspNetCompilerParameters.aspNetKeyContainer)); 1693metaprojectInstance.SetProperty(GenerateSafePropertyName(project, "AspNetDelaySign"), EscapingUtilities.Escape(aspNetCompilerParameters.aspNetDelaySign)); 1694metaprojectInstance.SetProperty(GenerateSafePropertyName(project, "AspNetAPTCA"), EscapingUtilities.Escape(aspNetCompilerParameters.aspNetAPTCA)); 1695metaprojectInstance.SetProperty(GenerateSafePropertyName(project, "AspNetFixedNames"), EscapingUtilities.Escape(aspNetCompilerParameters.aspNetFixedNames)); 1743string publishWebsitePath = EscapingUtilities.Escape(WebProjectOverrideFolder) + Path.DirectorySeparatorChar + EscapingUtilities.Escape(lastFolderInPhysicalPath) + Path.DirectorySeparatorChar; 2048AddProjectBuildTask(traversalProject, projectConfiguration, targetElement, targetToBuild, "@(ProjectReference)", "'%(ProjectReference.Identity)' == '" + EscapingUtilities.Escape(project.AbsolutePath) + "'", outputItemName); 2068properties[property.Item1] = EscapingUtilities.Escape(traversalProject.GetPropertyValue(property.Item1)); 2072properties[property.Item1] = EscapingUtilities.Escape(property.Item2); 2229configurationDefaultingPropertyGroup.AddProperty("Configuration", EscapingUtilities.Escape(_solutionFile.GetDefaultConfigurationName())); 2235platformDefaultingPropertyGroup.AddProperty("Platform", EscapingUtilities.Escape(_solutionFile.GetDefaultPlatformName())); 2280globalProperties.AddProperty("SolutionDir", EscapingUtilities.Escape(directoryName)); 2281globalProperties.AddProperty("SolutionExt", EscapingUtilities.Escape(Path.GetExtension(_solutionFile.FullPath))); 2282globalProperties.AddProperty("SolutionFileName", EscapingUtilities.Escape(Path.GetFileName(_solutionFile.FullPath))); 2283globalProperties.AddProperty("SolutionName", EscapingUtilities.Escape(Path.GetFileNameWithoutExtension(_solutionFile.FullPath))); 2285globalProperties.AddProperty(SolutionPathPropertyName, EscapingUtilities.Escape(Path.Combine(_solutionFile.SolutionFileDirectory, Path.GetFileName(_solutionFile.FullPath))));
Definition\BuiltInMetadata.cs (1)
114return EscapingUtilities.Escape(match.wildcardDirectoryPart);
Definition\ProjectCollection.cs (1)
988return EscapingUtilities.Escape(unescapedString);
Definition\Toolset.cs (2)
904reservedProperties.Add(ProjectPropertyInstance.Create(ReservedPropertyNames.binPath, EscapingUtilities.Escape(ToolsPath), mayBeReserved: true)); 907reservedProperties.Add(ProjectPropertyInstance.Create(ReservedPropertyNames.toolsPath, EscapingUtilities.Escape(ToolsPath), mayBeReserved: true));
Evaluation\Evaluator.cs (6)
1173string projectFileWithoutExtension = EscapingUtilities.Escape(Path.GetFileNameWithoutExtension(_projectRootElement.FullPath)); 1174string projectExtension = EscapingUtilities.Escape(Path.GetExtension(_projectRootElement.FullPath)); 1176string projectDirectory = EscapingUtilities.Escape(_projectRootElement.DirectoryPath); 1928propertyGroup.AddProperty(propertyNameAndValue.Key, EscapingUtilities.Escape(propertyNameAndValue.Value)); 1944escapedMetadata[metadata.Key] = EscapingUtilities.Escape(metadata.Value); 1948itemGroup.AddItem(item.Key, EscapingUtilities.Escape(item.Value.ItemSpec), escapedMetadata);
Evaluation\Expander.cs (7)
1492builder.Append(EscapingUtilities.Escape(ConvertToString(entry.Key))); 1494builder.Append(EscapingUtilities.Escape(ConvertToString(entry.Value))); 1518builder.Append(EscapingUtilities.Escape(ConvertToString(element))); 2455string escapedPath = EscapingUtilities.Escape(combinedPath); 2530string escapedDirectoryPath = EscapingUtilities.Escape(directoryPath); 2587directoryName = EscapingUtilities.Escape(directoryName); 3630functionResult = EscapingUtilities.Escape(functionResultString);
Evaluation\IntrinsicFunctions.cs (1)
129return EscapingUtilities.Escape(unescaped);
FileUtilities.cs (1)
762string fullPath = EscapingUtilities.Escape(NormalizePath(Path.Combine(currentDirectory, fileSpec)));
Graph\GraphBuilder.cs (5)
301solutionGlobalPropertiesBuilder["SolutionDir"] = EscapingUtilities.Escape(solutionDirectoryName); 302solutionGlobalPropertiesBuilder["SolutionExt"] = EscapingUtilities.Escape(Path.GetExtension(Solution.FullPath)); 303solutionGlobalPropertiesBuilder["SolutionFileName"] = EscapingUtilities.Escape(Path.GetFileName(Solution.FullPath)); 304solutionGlobalPropertiesBuilder["SolutionName"] = EscapingUtilities.Escape(Path.GetFileNameWithoutExtension(Solution.FullPath)); 305solutionGlobalPropertiesBuilder[SolutionProjectGenerator.SolutionPathPropertyName] = EscapingUtilities.Escape(Path.Combine(Solution.SolutionFileDirectory, Path.GetFileName(Solution.FullPath)));
Instance\ProjectItemInstance.cs (1)
1373SetMetadata(metadataName, EscapingUtilities.Escape(metadataValue));
Instance\ProjectPropertyInstance.cs (1)
78_escapedValue = EscapingUtilities.Escape(value);
PropertyParser.cs (2)
107string propertyValue = EscapingUtilities.Escape(propertyNameValueString.Substring(indexOfEqualsSign + 1).Trim()); 150string propertyValue = EscapingUtilities.Escape(propertyNameValueString.Trim());
TaskParameter.cs (7)
317escapedItemSpec = EscapingUtilities.Escape(copyFrom.ItemSpec); 328escapedMetadata.Add(key, EscapingUtilities.Escape((string)customMetadata[key] ?? String.Empty)); 421escapedItemSpec = EscapingUtilities.Escape(wrappedItem.ItemSpec); 439value = (value == null) ? value : EscapingUtilities.Escape(value); 449escapedGenericWrappedMetadata[entry.Key] = entry.Value == null ? entry.Value : EscapingUtilities.Escape(entry.Value); 909destinationItem.SetMetadata("OriginalItemSpec", EscapingUtilities.Escape(ItemSpec)); 978SetMetadata(metadataName, EscapingUtilities.Escape(metadataValue));
Utilities\EngineFileUtilities.cs (1)
351fileList[i] = EscapingUtilities.Escape(fileList[i]);
Microsoft.Build.Engine.UnitTests (17)
EscapingUtilities_Tests.cs (10)
40Assert.Equal("%2a", EscapingUtilities.Escape("*")); 41Assert.Equal("%3f", EscapingUtilities.Escape("?")); 42Assert.Equal("#%2a%3f%2a#%2a", EscapingUtilities.Escape("#*?*#*")); 43Assert.Equal("%25%2a%3f%2a%25%2a", EscapingUtilities.Escape("%*?*%*")); 52Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text))); 55Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text))); 58Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text))); 67Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text))); 70Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text))); 73Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text)));
Evaluation\Expander_Tests.cs (7)
4456TestPropertyFunction("$([Microsoft.Build.Evaluation.IntrinsicFunctions]::GetCurrentToolsDirectory())", "X", "_", EscapingUtilities.Escape(IntrinsicFunctions.GetCurrentToolsDirectory())); 4462TestPropertyFunction("$([Microsoft.Build.Evaluation.IntrinsicFunctions]::GetToolsDirectory32())", "X", "_", EscapingUtilities.Escape(IntrinsicFunctions.GetToolsDirectory32())); 4468TestPropertyFunction("$([Microsoft.Build.Evaluation.IntrinsicFunctions]::GetToolsDirectory64())", "X", "_", EscapingUtilities.Escape(IntrinsicFunctions.GetToolsDirectory64())); 4474TestPropertyFunction("$([Microsoft.Build.Evaluation.IntrinsicFunctions]::GetMSBuildSDKsPath())", "X", "_", EscapingUtilities.Escape(IntrinsicFunctions.GetMSBuildSDKsPath())); 4480string vsInstallRoot = EscapingUtilities.Escape(IntrinsicFunctions.GetVsInstallRoot()); 4490TestPropertyFunction("$([Microsoft.Build.Evaluation.IntrinsicFunctions]::GetMSBuildExtensionsPath())", "X", "_", EscapingUtilities.Escape(IntrinsicFunctions.GetMSBuildExtensionsPath())); 4496TestPropertyFunction("$([Microsoft.Build.Evaluation.IntrinsicFunctions]::GetProgramFiles32())", "X", "_", EscapingUtilities.Escape(IntrinsicFunctions.GetProgramFiles32()));