1892 references to Replace
Aspire.Azure.Messaging.EventHubs (1)
EventHubsComponent.cs (1)
106ns = ns.Replace(".", "-");
Aspire.Azure.Messaging.EventHubs.Tests (2)
AspireEventHubsExtensionsTests.cs (2)
552new KeyValuePair<string, string?>("ConnectionStrings:eh2", EhConnectionString.Replace("aspireeventhubstests", "aspireeventhubstests2")), 556new KeyValuePair<string, string?>("ConnectionStrings:eh3", EhConnectionString.Replace("aspireeventhubstests", "aspireeventhubstests3")),
Aspire.Dashboard.Tests (2)
Integration\MockOpenIdAuthority.cs (1)
122var authorityUrl = serverAddress.Addresses.First().Replace("127.0.0.1", "localhost");
Integration\Playwright\Infrastructure\DashboardServerFixture.cs (1)
44var aspireAssemblyDirectory = currentAssemblyDirectory.Replace(currentAssemblyName, aspireDashboardAssemblyName);
Aspire.EndToEnd.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
155programCs = programCs.Replace("builder.Build().Run();", EndpointWritersCodeSnippet);
Aspire.Hosting.Analyzers (1)
Infrastructure\WellKnownTypes.cs (1)
33var typeIdName = typeId.ToString().Replace("__", "+").Replace('_', '.');
Aspire.Hosting.Analyzers.Tests (1)
AnalyzerTest.cs (1)
46private static string TrimAssemblyExtension(string fullPath) => fullPath.Replace(".dll", string.Empty);
Aspire.Hosting.Azure (4)
AzureProvisioningResourceExtensions.cs (4)
271var parameterName = ep.ValueExpression.Replace("{", "").Replace("}", "").Replace(".", "_").Replace("-", "_").ToLowerInvariant();
Aspire.Hosting.Azure.Tests (2)
AzureBicepResourceTests.cs (2)
1320qs!.Replace("{storage.bindings." + name + ".host}", "127.0.0.1") 1321.Replace("{storage.bindings." + name + ".port}", port.ToString());
Aspire.Hosting.Docker (6)
DockerComposeServiceResource.cs (1)
99var imageEnvName = $"{resourceInstance.Name.ToUpperInvariant().Replace("-", "_")}_IMAGE";
DockerComposeServiceResourceExtensions.cs (5)
118var env = parameter.Name.ToUpperInvariant().Replace("-", "_"); 138var env = parameter.ValueExpression.Replace("{", "") 139.Replace("}", "") 140.Replace(".", "_") 141.Replace("-", "_")
Aspire.Hosting.Kubernetes (4)
Extensions\HelmExtensions.cs (1)
20=> name.Replace("-", "_");
KubernetesServiceResourceExtensions.cs (3)
131var formattedName = parameter.ValueExpression.Replace("{", "") 132.Replace("}", "") 133.Replace(".", "_")
Aspire.Hosting.Nats.Tests (3)
NatsFunctionalTests.cs (3)
129? connectionString!.Replace(new Uri(connectionString).UserInfo, null) 130: connectionString!.Replace("user", user).Replace("password", password);
Aspire.Hosting.Orleans (1)
ProviderConfiguration.cs (1)
38var envVarPrefix = configurationSectionName.Replace(":", "__");
Aspire.Hosting.Tests (1)
Utils\DockerfileUtils.cs (1)
51var dockerfileContent = dockerfileTemplate.Replace("!!!CACHEBUSTER!!!", cacheBuster.ToString());
Aspire.Templates.Tests (6)
BuildAndRunStarterTemplateBuiltInTest.cs (1)
35string id = TemplateTestsBase.GetNewProjectId(prefix: $"starter test.{config}-{testType.Replace(".", "_")}");
BuildAndRunTemplateTests.cs (3)
155string id = GetNewProjectId(prefix: $"aspire_apphost_{version.Replace("*", "wildcard").Replace("[", "").Replace("]", "")}");
TemplateTestsBase.cs (1)
105.Replace("</Project>", $"<ItemGroup>{projectReference}</ItemGroup>\n</Project>");
tests\Shared\TemplatesTesting\AspireProject.cs (1)
155programCs = programCs.Replace("builder.Build().Run();", EndpointWritersCodeSnippet);
BasicTestApp (1)
artifacts\obj\BasicTestApp\Release\net10.0\BasicTestApp.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Binding.Http.IntegrationTests (1)
BasicHttpBindingTests.4.0.0.cs (1)
164requestMessageBody = requestMessageBody.Replace(testString, substituteString);
BuildValidator (1)
CompilationDiff.cs (1)
404var hashString = BitConverter.ToString(info.CompressedHash.ToArray()).Replace("-", "");
Client.ExpectedExceptions.IntegrationTests (1)
ExpectedExceptionTests.4.1.0.cs (1)
93restartServiceAddress = restartServiceAddress.Replace("[HOST]", hostName);
CodeGenerator (3)
HttpUtilities\HttpUtilities.cs (1)
109result.AppendFormat(CultureInfo.InvariantCulture, " private static readonly ulong {0} = GetAsciiStringAsLong(\"{1}\");", httpMethodFieldName, methodInfo.MethodAsciiString.Replace("\0", "\\0"));
src\Servers\Kestrel\shared\KnownHeaders.cs (2)
454if ({byFirstTerm.Key.Replace(firstTermVarExpression, firstTermVar)}) 495_ => name.Replace("-", "")
ConfigurationSchemaGenerator (11)
ConfigSchemaEmitter.cs (8)
482.Replace(" <br/> ", "\n") 483.Replace(" <br/>", "\n") 484.Replace("<br/> ", "\n") 485.Replace("<br/>", "\n") 486.Replace("\n\n\n\n", "\n\n") 683.Replace(".properties", "") 684.Replace(".items", "") 685.Replace(".additionalProperties", "");
RuntimeSource\Configuration.Binder\Parser\Extensions.cs (2)
103: type.ToDisplayString(s_identifierCompatibleFormat).Replace(".", string.Empty); 127string fullname = (@namespace is null ? string.Empty : @namespace + ".") + displayString.Replace(".", "+");
RuntimeSource\Configuration.Binder\Specs\TypeIndex.cs (1)
133displayString = displayString.Replace(".", "");
ConfigurationSchemaGenerator.Tests (1)
GeneratorTests.cs (1)
47MetadataReference.CreateFromFile(typeof(Attribute).Assembly.Location.Replace("System.Private.CoreLib", "System.Runtime")),
csc (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
580.Replace("/", "_") 581.Replace("=", string.Empty);
CSharpSyntaxGenerator (1)
TestWriter.cs (1)
143typeName = internalNamespace + field.Type.Replace("<", "<" + csharpNamespace);
Diagnostics.EFCore.FunctionalTests (8)
DatabaseErrorPageMiddlewareTest.cs (8)
146Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_AddMigrationCommandPMC").Replace(">", "&gt;"), content); 147Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_ApplyMigrationsCommandPMC").Replace(">", "&gt;"), content); 208Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_ApplyMigrationsCommandPMC").Replace(">", "&gt;"), content); 212Assert.DoesNotContain(StringsHelpers.GetResourceString("DatabaseErrorPage_AddMigrationCommandPMC").Replace(">", "&gt;"), content); 247Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_AddMigrationCommandCLI").Replace(">", "&gt;"), content); 248Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_AddMigrationCommandPMC").Replace(">", "&gt;"), content); 249Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_ApplyMigrationsCommandCLI").Replace(">", "&gt;"), content); 250Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_ApplyMigrationsCommandPMC").Replace(">", "&gt;"), content);
dotnet-getdocument (1)
artifacts\obj\dotnet-getdocument\Release\net10.0\Microsoft.Extensions.ApiDescription.Tool.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
dotnet-sql-cache (2)
SqlQueries.cs (2)
55return "[" + identifier.Replace("]", "]]") + "]"; 60return literal.Replace("'", "''");
dotnet-svcutil.xmlserializer.IntegrationTests (3)
SvcutilTests.cs (3)
24string smassemblypath = testassemblypath.Replace("dotnet-svcutil.xmlserializer.IntegrationTests", "System.ServiceModel.Primitives").Replace("Microsoft.Tools.ServiceModel.SvcUtil.XmlSerializer.IntegrationTests.dll", "System.ServiceModel.Primitives.dll").Replace("netcoreapp", "netstandard");
dotnet-svcutil-lib (40)
CodeDomFixup\CodeDomVisitors\NamespaceFixer.cs (6)
50attr.Name = attr.Name.Replace(s_microsoftXml, s_systemXml); 54attr.Name = attr.Name.Replace(s_microsoftCodeDom, s_systemCodeDom); 63comment.Text = comment.Text.Replace(s_microsoftXml, s_systemXml); 67comment.Text = comment.Text.Replace(s_microsoftCodeDom, s_systemCodeDom); 76typeref.BaseType = typeref.BaseType.Replace(s_microsoftXml, s_systemXml); 80typeref.BaseType = typeref.BaseType.Replace(s_microsoftCodeDom, s_systemCodeDom);
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (2)
777string strValue = Enum.Format(a.SoapDefaultValue.GetType(), a.SoapDefaultValue, "G").Replace(",", " "); 811typeName = typeName.Replace(argument, XsdTypeName(types[i]));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (2)
979typeName = typeName.Replace(argument, XsdTypeName(types[i])); 2145string strValue = Enum.Format(t, a.XmlDefaultValue, "G").Replace(",", " ");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (5)
1602string arrayNamePlusA = (arrayName).Replace(arrayTypeDesc.Name, "") + "a" + arrayElementTypeDesc.Name; 1603string arrayNamePlusI = (arrayName).Replace(arrayTypeDesc.Name, "") + "i" + arrayElementTypeDesc.Name; 1625string iPlusArrayName = "i" + (arrayName).Replace(arrayTypeDesc.Name, ""); 1626string arrayNamePlusA = (arrayName).Replace(arrayTypeDesc.Name, "") + "a" + arrayElementTypeDesc.Name; 1627string arrayNamePlusI = (arrayName).Replace(arrayTypeDesc.Name, "") + "i" + arrayElementTypeDesc.Name;
FrameworkFork\System.ServiceModel\Internals\System\Runtime\UrlUtility.cs (1)
161str = str.Replace(" ", "%20");
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SecurityBindingElement.cs (4)
1422sb.AppendLine(" " + this.EndpointSupportingTokenParameters.ToString().Trim().Replace("\n", "\n ")); 1424sb.AppendLine(" " + this.OptionalEndpointSupportingTokenParameters.ToString().Trim().Replace("\n", "\n ")); 1434sb.AppendLine(" " + this.OperationSupportingTokenParameters[requestAction].ToString().Trim().Replace("\n", "\n ")); 1446sb.AppendLine(" " + this.OptionalOperationSupportingTokenParameters[requestAction].ToString().Trim().Replace("\n", "\n "));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SecurityBindingElementImporter.cs (2)
241sb.AppendLine(_initiatorTokenParameters.ToString().Trim().Replace("\n", "\n ")); 246sb.AppendLine(_recipientTokenParameters.ToString().Trim().Replace("\n", "\n "));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SymmetricSecurityBindingElement.cs (1)
190sb.AppendLine(_protectionTokenParameters.ToString().Trim().Replace("\n", "\n "));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceMetadataExtension.cs (2)
176text = text.Replace(_oldValue, _newValue); 236text = text.Replace(ServiceMetadataExtension.BaseAddressPattern, _newBaseAddress);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationGenerator.cs (1)
209string comparableTypeName = typeName.Replace("[]", null);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\IssuedSecurityTokenParameters.cs (1)
614sb.AppendLine(" " + bindingElements[i].ToString().Trim().Replace("\n", "\n "));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\SecureConversationSecurityTokenParameters.cs (1)
173sb.AppendLine(" " + this.BootstrapSecurityBindingElement.ToString().Trim().Replace("\n", "\n "));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\SupportingTokenParameters.cs (4)
121sb.AppendLine(" " + _endorsing[k].ToString().Trim().Replace("\n", "\n ")); 130sb.AppendLine(" " + _signed[k].ToString().Trim().Replace("\n", "\n ")); 139sb.AppendLine(" " + _signedEncrypted[k].ToString().Trim().Replace("\n", "\n ")); 148sb.AppendLine(" " + _signedEndorsing[k].ToString().Trim().Replace("\n", "\n "));
Shared\Options\OptionValueParser.cs (4)
110value = (uri.IsAbsoluteUri && uri.IsFile ? uri.LocalPath : uri.OriginalString).Replace("\\", "/"); 114value = di.OriginalPath().Replace("\\", "/"); 118value = fi.OriginalPath().Replace("\\", "/"); 122value = proj.FullPath.Replace("\\", "/");
ToolConsole.cs (4)
128str = str.Replace("\\r\\n", Environment.NewLine); 135str = logTag + str.Replace(Environment.NewLine, newLineReplacement); 166WriteWarning(conversionError.Message.Replace("\r\n", Environment.NewLine).Trim(trimLFNL)); 170WriteError(conversionError.Message.Replace("\r\n", Environment.NewLine).Trim(trimLFNL));
dotnet-svcutil-lib.Tests (47)
E2ETests.cs (18)
96var tr = $"-r \"\"{{Newtonsoft.Json,*}}\"\" -bd {this_TestCaseBootstrapDir.Replace("\\", "/")}"; 97var options = $"{uri.Replace("\\", "/")} {tf} {tr} -nl -tc global -v minimal -d ../{testCaseName} -n \"\"*,{testCaseName}_NS\"\""; 146.Replace("$serviceUrl$", g_ServiceUrl) 147.Replace("$testCaseBootstratDir$", $"\"\"{this_TestCaseBootstrapDir}\"\"") 148.Replace("$testCasesPath$", g_TestCasesDir); 182uri = uri.Replace("$wsdlDir$", $"{Path.GetDirectoryName(wsdlFile)}{Path.DirectorySeparatorChar}"); 215var options = $"{uri} -nl -v minimal -d {outDir.Replace("\\", "/")} -n \"\"*,{testCaseName}_NS\"\" -bd {this_TestCaseBootstrapDir.Replace("\\", "/")}"; 325var testCaseName = referenceFolderName.Replace(" ", "_").Split('/').Last(); 328cmdOptions = cmdOptions?.Replace("$testCaseOutputDir$", this_TestCaseOutputDir.Replace("\\", "/")); 348var testCaseName = referenceFolderName.Replace(" ", "_").Split('/').Last(); 383File.WriteAllText(dstParamsFile, File.ReadAllText(dstParamsFile).Replace("$testCasesPath$", g_TestCasesDir.Replace("\\", "/"))); 428var testCaseName = serviceName.Replace(".svc", ""); 431var uri = $"{g_ServiceUrl}/{serviceName}".Replace("http", "net.tcp"); 518var testCaseName = serviceName.Replace(".svc", "").Replace("/", "_");
FixupUtil.cs (11)
42new ReplaceInfo(Path.GetTempPath().Replace("\\", "\\\\"), "$TEMP$"), 43new ReplaceInfo(Path.GetTempPath().Replace("\\", "/"), "$TEMP$"), 70_replacements.Add(new ReplaceInfo(resultPathReplacement.Replace("\\", "\\\\"), "$resultPath$")); 75_replacements.Add(new ReplaceInfo(testCasesPath.Replace("\\", "\\\\"), "$testCasesPath$")); 78_replacements.Add(new ReplaceInfo(projectPath.Replace("\\", "\\\\"), "$projectPath$")); 80_replacements.Add(new ReplaceInfo(repositoryRoot.Replace("\\", "/"), "$repositoryRoot$")); 81_replacements.Add(new ReplaceInfo(repositoryRoot.Replace("\\", "\\\\"), "$repositoryRoot$")); 125originalText = originalText.Replace("\0", ""); 130originalText = originalText.Replace("\r\n", "\n"); 131originalText = originalText.Replace("\n", "\r\n"); 166updatedText = updatedText.Replace(target, value);
GlobalToolTests.cs (4)
80var tr = $"-r \"{{Newtonsoft.Json, *}}\" -bd {this_TestCaseBootstrapDir.Replace("\\", "/")}"; 81var options = $"{uri.Replace("\\", "/")} {tf} {tr} -nl -tc global -v minimal -d ../{testCaseName} -n \"*, {testCaseName}_NS\""; 178var testCaseName = $"TF{targetFramework}".Replace(".", "_"); 184var ns = testCaseName.Replace(".", "_") + "_NS";
ProjectUtils.cs (5)
112csStr = csStr.Replace(csStr.Substring(start, end - start), "string optstring = @\"" + options + "\";\r\n"); 126csStr = csStr.Replace("using System;", "using System;\r\nusing Microsoft.Tools.ServiceModel.Svcutil;\r\nusing System.Linq;\r\nusing System.Text.RegularExpressions;"); 127csStr = csStr.Replace("static void Main", "static int Main"); 128csStr = csStr.Replace("Console.WriteLine(\"Hello World!\");", replacement); 133csStr = csStr.Replace("Console.WriteLine(\"Hello, World!\");", replacement);
TestInit.cs (2)
119.Replace(Path.GetFileNameWithoutExtension(project.FileName), projectName)); 624File.WriteAllText(Path.Combine(g_TestOutputDir, "nuget.config"), nugetConfigText.Replace("$svcutilTestFeed$", g_SvcutilNugetFeed));
UnitTest.cs (7)
222FileUtil.CopyDirectory(wsdlFilesSrcDir.Replace("$testCasesDir$", g_TestCasesDir), Path.Combine(wsdlFilesDstDir, "WcfProjectNService"), overwrite: true); 240.Replace("$projectPath$", this_TestCaseProject.FullPath) 241.Replace("$testCasesDir$", g_TestCasesDir) 242.Replace("$testOutputDir$", this_TestGroupOutputDir) 243.Replace("$testCaseOutputDir$", this_TestCaseOutputDir) 244.Replace("$testCasesDir$", g_TestCasesDir) 245.Replace("$bootstrapDir$", this_TestCaseBootstrapDir)
dotnet-user-jwts (2)
artifacts\obj\dotnet-user-jwts\Release\net10.0\Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\dotnet-user-jwts\Release\net10.0\Microsoft.AspNetCore.Tools.SecretsHelpersResources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
dotnet-user-secrets (2)
artifacts\obj\dotnet-user-secrets\Release\net10.0\Microsoft.AspNetCore.Tools.SecretsHelpersResources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\dotnet-user-secrets\Release\net10.0\Microsoft.Extensions.SecretManager.Tools.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
GenerateDocumentationAndConfigFiles (3)
Program.cs (3)
616=> Regex.Replace(text, "(<.+?>)", "\\$1").Replace("*", @"\*"); 677writer.Write("fullDescription", !string.IsNullOrEmpty(fullDescription) ? fullDescription.Replace("\r\n", "\n") : descriptor.MessageFormat.ToString(CultureInfo.InvariantCulture)); 810var escapedTitle = descriptor.Title.ToString(CultureInfo.InvariantCulture).Replace("<", "\\<");
GenerateRulesMissingDocumentation (1)
Program.cs (1)
78var escapedTitle = descriptor.Title.ToString(CultureInfo.InvariantCulture).Replace("<", "\\<");
GetDocument.Insider (2)
artifacts\obj\GetDocument.Insider\Release\net462\Microsoft.Extensions.ApiDescription.Tool.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Commands\GetDocumentCommandWorker.cs (1)
415sanitizedDocumentName = sanitizedDocumentName.Replace(InvalidFilenameString, DotString);
HotAddSample (1)
Startup.cs (1)
52await context.Response.WriteAsync(ex.ToString().Replace(Environment.NewLine, "<br>"));
http2cat (2)
artifacts\obj\http2cat\Release\net10.0\Microsoft.AspNetCore.Server.SharedStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\http2cat\Release\net10.0\System.Net.Http.SR.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
IdeCoreBenchmarks (6)
FormatterBenchmarks.cs (6)
39var text = File.ReadAllText(csFilePath).Replace("<auto-generated />", "") 40.Replace($"{{{Environment.NewLine}{Environment.NewLine}", "{") 41.Replace($"}}{Environment.NewLine}{Environment.NewLine}", "}") 42.Replace($"{{{Environment.NewLine}", "{") 43.Replace($"}}{Environment.NewLine}", "}") 44.Replace($";{Environment.NewLine}", ";");
Identity.ExternalClaims (5)
Pages\Account\LoginWith2fa.cshtml.cs (2)
76var authenticatorCode = Input.TwoFactorCode.Replace(" ", string.Empty).Replace("-", string.Empty);
Pages\Account\LoginWithRecoveryCode.cshtml.cs (1)
69var recoveryCode = Input.RecoveryCode.Replace(" ", string.Empty);
Pages\Account\Manage\EnableAuthenticator.cshtml.cs (2)
88var verificationCode = Input.Code.Replace(" ", string.Empty).Replace("-", string.Empty);
IIS.FunctionalTests (7)
artifacts\obj\IIS.FunctionalTests\Release\net10.0\Microsoft.AspNetCore.Server.SharedStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\IIS.FunctionalTests\Release\net10.0\System.Net.Http.SR.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
251imageAttribute.Value = imageAttribute.Value.Replace(sourceDirectory.FullName, destinationDirectory.FullName);
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (4)
66webSocketUri = webSocketUri.Replace("http:", "ws:"); 79webSocketUri = webSocketUri.Replace("http:", "ws:"); 91webSocketUri = webSocketUri.Replace("http:", "ws:"); 108webSocketUri = webSocketUri.Replace("http:", "ws:");
IIS.LongTests (3)
artifacts\obj\IIS.LongTests\Release\net10.0\Microsoft.AspNetCore.Server.SharedStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\IIS.LongTests\Release\net10.0\System.Net.Http.SR.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
323ancmElement.SetAttributeValue("image", ancmElement.Attribute("image").Value.Replace("x64", "x86"));
IIS.NewHandler.FunctionalTests (3)
artifacts\obj\IIS.NewHandler.FunctionalTests\Release\net10.0\Microsoft.AspNetCore.Server.SharedStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\IIS.NewHandler.FunctionalTests\Release\net10.0\System.Net.Http.SR.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
323ancmElement.SetAttributeValue("image", ancmElement.Attribute("image").Value.Replace("x64", "x86"));
IIS.NewShim.FunctionalTests (3)
artifacts\obj\IIS.NewShim.FunctionalTests\Release\net10.0\Microsoft.AspNetCore.Server.SharedStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\IIS.NewShim.FunctionalTests\Release\net10.0\System.Net.Http.SR.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
323ancmElement.SetAttributeValue("image", ancmElement.Attribute("image").Value.Replace("x64", "x86"));
IIS.ShadowCopy.Tests (2)
artifacts\obj\IIS.ShadowCopy.Tests\Release\net10.0\Microsoft.AspNetCore.Server.SharedStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\IIS.ShadowCopy.Tests\Release\net10.0\System.Net.Http.SR.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
IISExpress.FunctionalTests (8)
artifacts\obj\IISExpress.FunctionalTests\Release\net10.0\Microsoft.AspNetCore.Server.SharedStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\IISExpress.FunctionalTests\Release\net10.0\System.Net.Http.SR.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
251imageAttribute.Value = imageAttribute.Value.Replace(sourceDirectory.FullName, destinationDirectory.FullName);
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (4)
66webSocketUri = webSocketUri.Replace("http:", "ws:"); 79webSocketUri = webSocketUri.Replace("http:", "ws:"); 91webSocketUri = webSocketUri.Replace("http:", "ws:"); 108webSocketUri = webSocketUri.Replace("http:", "ws:");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
323ancmElement.SetAttributeValue("image", ancmElement.Attribute("image").Value.Replace("x64", "x86"));
illink (5)
Infrastructure.Common (4)
JsonSerializer.cs (4)
33data = data.Replace("{", String.Empty) 34.Replace("}", String.Empty) 43string key = pair.Substring(0, colonPos - 1).Replace("\"", String.Empty).Trim(); 44string value = pair.Substring(colonPos + 1).Replace("\"", String.Empty).Trim();
InMemory.FunctionalTests (6)
src\Servers\Kestrel\shared\test\CertHelper.cs (2)
176return (protocol?.ToString() ?? "null").Replace(", ", "-"); 186name = name.Replace("_", string.Empty);
src\Servers\Kestrel\shared\test\StringExtensions.cs (4)
16.Replace("\r", @"\x0D") 17.Replace("\n", @"\x0A") 18.Replace("\0", @"\x00") 19.Replace("\x80", @"\x80")
installer.tasks (15)
GenerateFileVersionProps.cs (1)
154var versionPropertyName = $"_{PackageId.Replace(".", "_")}_Version";
GenerateRunScript.cs (14)
80templateContent = templateContent.Replace("[[SetCommands]]", setCommandsBuilder.ToString()); 95templateContent = templateContent.Replace("[[RunCommands]]", runCommandsBuilder.ToString()); 106templateContent = templateContent.Replace("[[SetCommandsEcho]]", setCommandEchoesBuilder.ToString()); 116templateContent = templateContent.Replace("[[RunCommandsEcho]]", runCommandEchoesBuilder.ToString()); 122templateContent = templateContent.Replace("\r\n", "\n"); 137string sanitizedRunCommand = command.Replace("`", "\\`") 138.Replace("?", "\\") 139.Replace("\r","") 140.Replace("\n"," ") 141.Replace("&", "^&") 142.Replace(">", "^>"); 147sanitizedRunCommand = "\"" + sanitizedRunCommand.Replace("\"", "") 148.Replace("(", "") 149.Replace(")", "") + "\"";
InteractiveHost.UnitTests (1)
AbstractInteractiveHostTests.cs (1)
210=> paths.Length == 0 ? "SearchPaths { }" : $"SearchPaths {{ {string.Join(", ", paths.Select(p => "\"" + p.Replace("\\", "\\\\") + "\""))} }}";
InteropTests (1)
Helpers\ProcessDebugHelper.cs (1)
31return $"\"{value.Replace("\"", "\\\"")}\"";
Microsoft.Arcade.Common (2)
CommandFactory.cs (1)
45executable = (executable + " " + args).Replace("\"", "\\\"");
CompactConsoleLoggerFormatter.cs (1)
101textWriter.WriteLine(message.Replace(Environment.NewLine, _newLineWithMessagePadding));
Microsoft.Arcade.Test.Common (5)
AssertEx.cs (3)
425Func<T, string> itemInspector = escapeQuotes ? new Func<T, string>(t => t.ToString().Replace("\"", "\"\"")) : null; 489str.Trim().Replace("\r\n", "\n").Split(new[] { '\r', '\n' }, StringSplitOptions.None); 496itemInspector: line => line.Replace("\"", "\"\""),
MockFileSystem.cs (2)
90return targetPath.Replace(basePath, "").TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); 119_fileSystem.WriteToFile(_path, sr.ReadToEnd().Replace("\0", ""));
Microsoft.AspNetCore.Antiforgery (1)
artifacts\obj\Microsoft.AspNetCore.Antiforgery\Release\net10.0\Microsoft.AspNetCore.Antiforgery.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.App.Analyzers (6)
artifacts\obj\Microsoft.AspNetCore.App.Analyzers\Release\netstandard2.0\Microsoft.AspNetCore.Analyzers.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Infrastructure\RoutePattern\RoutePatternLexer.cs (2)
228new EmbeddedDiagnostic(Resources.FormatTemplateRoute_InvalidParameterName(token.Value!.ToString().Replace("{{", "{").Replace("}}", "}")), token.GetSpan()));
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
552: text.Replace(@"\", @"\\");
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
404: text.Replace(@"\", @"\\");
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
36var typeIdName = typeId.ToString().Replace("__", "+").Replace('_', '.');
Microsoft.AspNetCore.App.Analyzers.Test (17)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (6)
67.Replace("\"", DoubleQuoteEscaping) 68.Replace("&quot;", DoubleQuoteEscaping); 73Assert.Equal(expected.Replace("\"", DoubleQuoteEscaping), actual, ignoreLineEndingDifferences: true); 198Assert.Fail($"Parsing '{token.ValueText}' didn't throw an error for expected diagnostics: \r\n" + expectedDiagnostics.ToString().Replace(@"""", @"""""")); 217var actual = routeParameter.Policies[i].Substring(1).Replace("{{", "{").Replace("}}", "}");
RouteEmbeddedLanguage\RoutePatternParserTests_ConformanceTests.cs (10)
575var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 577Assert.Collection(parameter.Policies, p => Assert.Equal(":" + constraint.Replace("{", "{{").Replace("}", "}}"), p)); 589var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 598var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 613var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 626var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 646var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 696var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 784var tree = Test(@"""" + routePattern.Replace(@"\", @"\\") + @"""");
Verifiers\CSharpAnalyzerVerifier.cs (1)
106static string TrimAssemblyExtension(string fullPath) => fullPath.Replace(".dll", string.Empty);
Microsoft.AspNetCore.Authentication (1)
artifacts\obj\Microsoft.AspNetCore.Authentication\Release\net10.0\Microsoft.AspNetCore.Authentication.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Authentication.Abstractions (1)
artifacts\obj\Microsoft.AspNetCore.Authentication.Abstractions\Release\net10.0\Microsoft.AspNetCore.Authentication.Abstractions.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Authentication.Facebook (1)
artifacts\obj\Microsoft.AspNetCore.Authentication.Facebook\Release\net10.0\Microsoft.AspNetCore.Authentication.Facebook.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Authentication.Google (1)
artifacts\obj\Microsoft.AspNetCore.Authentication.Google\Release\net10.0\Microsoft.AspNetCore.Authentication.Google.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Authentication.JwtBearer (1)
artifacts\obj\Microsoft.AspNetCore.Authentication.JwtBearer\Release\net10.0\Microsoft.AspNetCore.Authentication.JwtBearer.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
artifacts\obj\Microsoft.AspNetCore.Authentication.MicrosoftAccount\Release\net10.0\Microsoft.AspNetCore.Authentication.MicrosoftAccount.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Authentication.OAuth (1)
artifacts\obj\Microsoft.AspNetCore.Authentication.OAuth\Release\net10.0\Microsoft.AspNetCore.Authentication.OAuth.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
artifacts\obj\Microsoft.AspNetCore.Authentication.OpenIdConnect\Release\net10.0\Microsoft.AspNetCore.Authentication.OpenIdConnect.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Authentication.Test (2)
OpenIdConnect\TestSettings.cs (2)
53var xdoc = XDocument.Parse(responseBody.Replace("doctype", "DOCTYPE")); 91var xdoc = XDocument.Parse(transaction.ResponseText.Replace("doctype", "DOCTYPE"));
Microsoft.AspNetCore.Authentication.Twitter (1)
artifacts\obj\Microsoft.AspNetCore.Authentication.Twitter\Release\net10.0\Microsoft.AspNetCore.Authentication.Twitter.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Authentication.WsFederation (1)
artifacts\obj\Microsoft.AspNetCore.Authentication.WsFederation\Release\net10.0\Microsoft.AspNetCore.Authentication.WsFederation.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Authorization (1)
artifacts\obj\Microsoft.AspNetCore.Authorization\Release\net462\Microsoft.AspNetCore.Authorization.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Authorization.Policy (1)
artifacts\obj\Microsoft.AspNetCore.Authorization.Policy\Release\net10.0\Microsoft.AspNetCore.Authorization.Policy.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests (1)
TransformTest.cs (1)
85transformFile = transformFile.Replace("%XDT_EXTENSIONPATH%", XdtExtensionPath);
Microsoft.AspNetCore.BrowserTesting (1)
PageInformation.cs (1)
93var messageText = message.Text.Replace(Environment.NewLine, $"{Environment.NewLine} ");
Microsoft.AspNetCore.Components (7)
artifacts\obj\Microsoft.AspNetCore.Components\Release\net10.0\Microsoft.AspNetCore.Components.Routing.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
RenderTree\RenderTreeFrame.cs (2)
489return text.Replace("\n", "\\n").Replace("\r\n", "\\r\\n");
src\Http\Routing\src\Patterns\RoutePatternParser.cs (4)
210var decoded = inside.Replace("}}", "}").Replace("{{", "{"); 304var decoded = encoded.Replace("}}", "}").Replace("{{", "{");
Microsoft.AspNetCore.Components.Analyzers (1)
artifacts\obj\Microsoft.AspNetCore.Components.Analyzers\Release\netstandard2.0\Microsoft.AspNetCore.Components.Analyzers.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Components.Endpoints (2)
artifacts\obj\Microsoft.AspNetCore.Components.Endpoints\Release\net10.0\Microsoft.AspNetCore.Components.Endpoints.FormMapping.FormDataResources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\Microsoft.AspNetCore.Components.Endpoints\Release\net10.0\Microsoft.AspNetCore.Components.Endpoints.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Components.Endpoints.Tests (13)
Assets\ImportMapDefinitionTest.cs (10)
25""".Replace("\r\n", "\n"); 37Assert.Equal(expectedJson, importMapDefinition.ToJson().Replace("\r\n", "\n")); 52""".Replace("\r\n", "\n"); 66Assert.Equal(expectedJson, importMapDefinition.ToJson().Replace("\r\n", "\n")); 82""".Replace("\r\n", "\n"); 96Assert.Equal(expectedJson, importMapDefinition.ToJson().Replace("\r\n", "\n")); 122""".Replace("\r\n", "\n"); 128Assert.Equal(expectedJson, importMapDefinition.ToJson().Replace("\r\n", "\n")); 193""".Replace("\r\n", "\n"); 199Assert.Equal(expectedImportMap, combinedImportMap.ToJson().Replace("\r\n", "\n"));
EndpointHtmlRendererTest.cs (2)
1168var lines = content.Replace("\r\n", "\n").Split('\n'); 1286Assert.Equal("<h1>This is InteractiveWithInteractiveChild</h1>\n\n<p>Hello from InteractiveGreetingServer!</p>", prerenderedContent.Replace("\r\n", "\n"));
RazorComponentResultTest.cs (1)
448return new StreamReader(stream).ReadToEnd().Replace("\r\n", "\n");
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
artifacts\obj\Microsoft.AspNetCore.Components.SdkAnalyzers\Release\netstandard2.0\Microsoft.AspNetCore.Components.Analyzers.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Components.Web.Tests (1)
HtmlRendering\HtmlRendererTest.cs (1)
1008And now with HTML encoding: Person with special chars like &#x27; &quot; &lt;/script&gt;".Replace("\r", ""), result.ToHtmlString());
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
DebugProxyLauncher.cs (2)
227capturedUrl = capturedUrl.Replace("http://", "ws://"); 228capturedUrl = capturedUrl.Replace("https://", "wss://");
Microsoft.AspNetCore.Components.WebView (1)
artifacts\obj\Microsoft.AspNetCore.Components.WebView\Release\net10.0\Microsoft.AspNetCore.Components.WebView.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Cors (2)
artifacts\obj\Microsoft.AspNetCore.Cors\Release\net10.0\Microsoft.AspNetCore.Cors.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Infrastructure\CorsPolicyExtensions.cs (1)
32return new Uri(origin.Replace(_WildcardSubdomain, string.Empty), UriKind.Absolute);
Microsoft.AspNetCore.Cryptography.Internal (1)
artifacts\obj\Microsoft.AspNetCore.Cryptography.Internal\Release\net10.0\Microsoft.AspNetCore.Cryptography.Internal.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.DataProtection (2)
artifacts\obj\Microsoft.AspNetCore.DataProtection\Release\net10.0\Microsoft.AspNetCore.DataProtection.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
TypeForwardingActivator.cs (1)
65forwardedTypeName = originalTypeName.Replace(OldNamespace, CurrentNamespace);
Microsoft.AspNetCore.DataProtection.Abstractions (1)
artifacts\obj\Microsoft.AspNetCore.DataProtection.Abstractions\Release\net10.0\Microsoft.AspNetCore.DataProtection.Abstractions.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.DataProtection.Extensions (1)
artifacts\obj\Microsoft.AspNetCore.DataProtection.Extensions\Release\net10.0\Microsoft.AspNetCore.DataProtection.Extensions.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.DataProtection.Tests (1)
RegistryPolicyResolverTests.cs (1)
57var typeName = typeof(MyKeyEscrowSink1).AssemblyQualifiedName.Replace("MyKeyEscrowSink1", "MyKeyEscrowSinkDontExist");
Microsoft.AspNetCore.Diagnostics (1)
artifacts\obj\Microsoft.AspNetCore.Diagnostics\Release\net10.0\Microsoft.AspNetCore.Diagnostics.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
artifacts\obj\Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore\Release\net10.0\Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Strings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
artifacts\obj\Microsoft.AspNetCore.Diagnostics.HealthChecks\Release\net10.0\Microsoft.AspNetCore.Diagnostics.HealthChecks.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Hosting (1)
artifacts\obj\Microsoft.AspNetCore.Hosting\Release\net10.0\Microsoft.AspNetCore.Hosting.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Http.Abstractions (2)
artifacts\obj\Microsoft.AspNetCore.Http.Abstractions\Release\net10.0\Microsoft.AspNetCore.Http.Abstractions.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
QueryString.cs (1)
68return HasValue ? Value.Replace("#", "%23") : string.Empty;
Microsoft.AspNetCore.Http.Connections.Tests (1)
MapConnectionHandlerTests.cs (1)
397var address = feature.Addresses.First().Replace("http", "ws") + "/socket";
Microsoft.AspNetCore.Http.Extensions (1)
artifacts\obj\Microsoft.AspNetCore.Http.Extensions\Release\net10.0\Microsoft.AspNetCore.Components.Endpoints.FormMapping.FormDataResources.cs (1)
27value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
366.Replace(RequestDelegateGeneratorSources.GeneratedCodeAttribute, "%GENERATEDCODEATTRIBUTE%"); 376.Replace("%GENERATEDCODEATTRIBUTE%", RequestDelegateGeneratorSources.GeneratedCodeAttribute)
Microsoft.AspNetCore.Http.Microbenchmarks (2)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
366.Replace(RequestDelegateGeneratorSources.GeneratedCodeAttribute, "%GENERATEDCODEATTRIBUTE%"); 376.Replace("%GENERATEDCODEATTRIBUTE%", RequestDelegateGeneratorSources.GeneratedCodeAttribute)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
artifacts\obj\Microsoft.AspNetCore.Http.RequestDelegateGenerator\Release\netstandard2.0\Microsoft.AspNetCore.Http.RequestDelegateGenerator.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
36var typeIdName = typeId.ToString().Replace("__", "+").Replace('_', '.');
Microsoft.AspNetCore.Http.ValidationsGenerator (6)
Emitters\ValidationsGenerator.Emitter.cs (5)
240.Replace(".", "_") 241.Replace("<", "_") 242.Replace(">", "_") 243.Replace(",", "_") 244.Replace(" ", "_");
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
36var typeIdName = typeId.ToString().Replace("__", "+").Replace('_', '.');
Microsoft.AspNetCore.HttpLogging (1)
artifacts\obj\Microsoft.AspNetCore.HttpLogging\Release\net10.0\Microsoft.AspNetCore.HttpLogging.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Identity (1)
artifacts\obj\Microsoft.AspNetCore.Identity\Release\net10.0\Microsoft.AspNetCore.Identity.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Identity.EntityFrameworkCore (1)
artifacts\obj\Microsoft.AspNetCore.Identity.EntityFrameworkCore\Release\net10.0\Microsoft.AspNetCore.Identity.EntityFrameworkCore.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Pages\Account\Manage\EnableAuthenticator.cs (1)
30var authenticatorKey = _codeElement.TextContent.Replace(" ", "");
Microsoft.AspNetCore.Identity.Test (3)
IdentityUIScriptsTest.cs (3)
87Path.Combine(wwwrootDir, scriptTag.FallbackSrc.Replace("Identity", "").TrimStart('~').TrimStart('/'))); 154return originalString.Replace("\r\n", "").Replace("\n", "");
Microsoft.AspNetCore.Identity.UI (12)
Areas\Identity\Pages\V4\Account\LoginWith2fa.cshtml.cs (2)
124var authenticatorCode = Input.TwoFactorCode.Replace(" ", string.Empty).Replace("-", string.Empty);
Areas\Identity\Pages\V4\Account\LoginWithRecoveryCode.cshtml.cs (1)
107var recoveryCode = Input.RecoveryCode.Replace(" ", string.Empty);
Areas\Identity\Pages\V4\Account\Manage\EnableAuthenticator.cshtml.cs (2)
131var verificationCode = Input.Code.Replace(" ", string.Empty).Replace("-", string.Empty);
Areas\Identity\Pages\V5\Account\LoginWith2fa.cshtml.cs (2)
124var authenticatorCode = Input.TwoFactorCode.Replace(" ", string.Empty).Replace("-", string.Empty);
Areas\Identity\Pages\V5\Account\LoginWithRecoveryCode.cshtml.cs (1)
107var recoveryCode = Input.RecoveryCode.Replace(" ", string.Empty);
Areas\Identity\Pages\V5\Account\Manage\EnableAuthenticator.cshtml.cs (2)
131var verificationCode = Input.Code.Replace(" ", string.Empty).Replace("-", string.Empty);
IdentityBuilderUIExtensions.cs (2)
129descriptor.RelativePath = descriptor.RelativePath.Replace("V4/", ""); 141descriptor.RelativePath = descriptor.RelativePath.Replace("V5/", "");
Microsoft.AspNetCore.JsonPatch (1)
artifacts\obj\Microsoft.AspNetCore.JsonPatch\Release\net10.0\Microsoft.AspNetCore.JsonPatch.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.JsonPatch.SystemTextJson (1)
artifacts\obj\Microsoft.AspNetCore.JsonPatch.SystemTextJson\Release\net10.0\Microsoft.AspNetCore.JsonPatch.SystemTextJson.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Localization (1)
artifacts\obj\Microsoft.AspNetCore.Localization\Release\net10.0\Microsoft.AspNetCore.Localization.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Mvc.Abstractions (1)
artifacts\obj\Microsoft.AspNetCore.Mvc.Abstractions\Release\net10.0\Microsoft.AspNetCore.Mvc.Abstractions.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Mvc.Core (3)
ApplicationModels\AttributeRouteModel.cs (2)
406.Replace("[[", "[") 407.Replace("]]", "]");
artifacts\obj\Microsoft.AspNetCore.Mvc.Core\Release\net10.0\Microsoft.AspNetCore.Mvc.Core.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Mvc.Core.Test (1)
Formatters\MediaTypeTest.cs (1)
140var expectedMediaType = mediaType.Replace("utf-8", "iso-8859-1");
Microsoft.AspNetCore.Mvc.Cors (1)
artifacts\obj\Microsoft.AspNetCore.Mvc.Cors\Release\net10.0\Microsoft.AspNetCore.Mvc.Cors.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Mvc.DataAnnotations (3)
artifacts\obj\Microsoft.AspNetCore.Mvc.DataAnnotations\Release\net10.0\Microsoft.AspNetCore.Mvc.DataAnnotations.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
FileExtensionsAttributeAdapter.cs (2)
23var normalizedExtensions = Attribute.Extensions.Replace(" ", string.Empty).Replace(".", string.Empty).ToLowerInvariant();
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (1)
artifacts\obj\Microsoft.AspNetCore.Mvc.DataAnnotations.Test\Release\net10.0\Microsoft.AspNetCore.Mvc.DataAnnotations.Test.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
artifacts\obj\Microsoft.AspNetCore.Mvc.Formatters.Xml\Release\net10.0\Microsoft.AspNetCore.Mvc.Formatters.Xml.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Mvc.FunctionalTests (17)
ApiExplorerTest.cs (1)
1577var testGroupName = nameof(ApiExplorerWithTypedResultController).Replace("Controller", string.Empty);
ComponentRenderingFunctionalTests.cs (2)
180expectedContent.Replace("\r\n", "\n"), 181content.Replace("\r\n", "\n"));
Infrastructure\ResourceFile.cs (7)
31responseContent = responseContent.Replace(token, "{0}"); 99text = streamReader.ReadToEnd().Replace("\r", "").Replace("\n", "\r\n"); 216var normalizedPreviousContent = previousContent?.Replace("\r", "").Replace("\n", "\r\n"); 217var normalizedContent = content.Replace("\r", "").Replace("\n", "\r\n");
JsonPatchInputFormatterTest.cs (7)
37var input = "[{ 'op': 'add', 'path': 'Reviews/-', 'value': { 'Rating': 3.5 }}]".Replace("'", "\""); 57var input = "[{ 'op': 'replace', 'path': 'Reviews/0/Rating', 'value': 5 }]".Replace("'", "\""); 77var input = "[{ 'op': 'copy', 'path': 'Reviews/1/Rating', 'from': 'Reviews/0/Rating'}]".Replace("'", "\""); 98var input = "[{ 'op': 'move', 'path': 'Reviews/1/Rating', 'from': 'Reviews/0/Rating'}]".Replace("'", "\""); 119var input = "[{ 'op': 'remove', 'path': 'Reviews/0/Rating'}]".Replace("'", "\""); 139var input = "[{ 'op': 'add', 'path': 'Reviews/-', 'value': { 'Rating': 'not-a-double' }}]".Replace("'", "\""); 153var input = "[{ 'op': 'invalid', 'path': 'Reviews/1/Rating', 'from': 'Reviews/0/Rating'}]".Replace("'", "\"");
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
HeaderModelBinderIntegrationTest.cs (1)
260expectedAttemptedValue = value.Replace(" ", "");
Microsoft.AspNetCore.Mvc.Localization (1)
Properties\Resources.Designer.cs (1)
55value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
artifacts\obj\Microsoft.AspNetCore.Mvc.NewtonsoftJson\Release\net10.0\Microsoft.AspNetCore.Mvc.NewtonsoftJson.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Mvc.Razor (3)
artifacts\obj\Microsoft.AspNetCore.Mvc.Razor\Release\net10.0\Microsoft.AspNetCore.Mvc.Razor.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
LanguageViewLocationExpander.cs (2)
89yield return location.Replace("{0}", temporaryCultureInfo.Name + "/{0}"); 93yield return location.Replace("{0}", "{0}." + temporaryCultureInfo.Name);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
artifacts\obj\Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation\Release\net10.0\Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Mvc.RazorPages (2)
artifacts\obj\Microsoft.AspNetCore.Mvc.RazorPages\Release\net10.0\Microsoft.AspNetCore.Mvc.RazorPages.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Infrastructure\PageViewLocationExpander.cs (1)
61yield return location.Replace("/{1}/", context.PageName.Substring(0, end + 1));
Microsoft.AspNetCore.Mvc.TagHelpers (1)
artifacts\obj\Microsoft.AspNetCore.Mvc.TagHelpers\Release\net10.0\Microsoft.AspNetCore.Mvc.TagHelpers.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Mvc.TagHelpers.Test (8)
ImageTagHelperTest.cs (3)
61.Returns(new Func<string, string>(url => url.Replace("~/", "virtualRoot/"))); 189return pathBase == null ? value.Replace("~/", string.Empty) : value.Replace("~/", pathBase + "/");
LinkTagHelperTest.cs (2)
59.Returns(new Func<string, string>(url => url.Replace("~/", "virtualRoot/"))); 784return value.Replace("~/", "/approot/");
ScriptTagHelperTest.cs (3)
58.Returns(new Func<string, string>(url => url.Replace("~/", "virtualRoot/"))); 689return value.Replace("~/", "/approot/"); 1046value.Replace("~/", "/approot/") :
Microsoft.AspNetCore.Mvc.Testing (2)
artifacts\obj\Microsoft.AspNetCore.Mvc.Testing\Release\net10.0\Microsoft.AspNetCore.Mvc.Testing.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
WebApplicationFactory.cs (1)
425var settingSuffix = assemblyName.ToUpperInvariant().Replace(".", "_");
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
artifacts\obj\Microsoft.AspNetCore.Mvc.ViewFeatures\Release\net10.0\Microsoft.AspNetCore.Mvc.ViewFeatures.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
artifacts\obj\Microsoft.AspNetCore.Mvc.ViewFeatures.Test\Release\net10.0\Microsoft.AspNetCore.Mvc.ViewFeatures.Test.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Rendering\HtmlHelperLinkGenerationTest.cs (2)
58expectedLink = expectedLink.Replace("HtmlEncode[[]]", string.Empty); 127expectedLink = expectedLink.Replace("HtmlEncode[[]]", string.Empty);
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
XmlCommentGenerator.Emitter.cs (1)
567.Replace("\"", "\"\""); // Escape double quotes
Microsoft.AspNetCore.OutputCaching (1)
artifacts\obj\Microsoft.AspNetCore.OutputCaching\Release\net10.0\Microsoft.AspNetCore.OutputCaching.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheEntryFormatterTests.cs (1)
105hex = hex.Replace("-", "");
Microsoft.AspNetCore.RateLimiting (1)
artifacts\obj\Microsoft.AspNetCore.RateLimiting\Release\net10.0\Microsoft.AspNetCore.RateLimiting.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Razor.Runtime (1)
artifacts\obj\Microsoft.AspNetCore.Razor.Runtime\Release\net10.0\Microsoft.AspNetCore.Razor.Runtime.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Rewrite (1)
artifacts\obj\Microsoft.AspNetCore.Rewrite\Release\net10.0\Microsoft.AspNetCore.Rewrite.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Routing (5)
artifacts\obj\Microsoft.AspNetCore.Routing\Release\net10.0\Microsoft.AspNetCore.Routing.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Patterns\RoutePatternParser.cs (4)
210var decoded = inside.Replace("}}", "}").Replace("{{", "{"); 304var decoded = encoded.Replace("}}", "}").Replace("{{", "{");
Microsoft.AspNetCore.Server.HttpSys (1)
artifacts\obj\Microsoft.AspNetCore.Server.HttpSys\Release\net10.0\Microsoft.AspNetCore.Server.HttpSys.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
artifacts\obj\Microsoft.AspNetCore.Server.HttpSys.FunctionalTests\Release\net10.0\Microsoft.AspNetCore.Server.SharedStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\Microsoft.AspNetCore.Server.HttpSys.FunctionalTests\Release\net10.0\System.Net.Http.SR.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Server.IIS (1)
artifacts\obj\Microsoft.AspNetCore.Server.IIS\Release\net10.0\Microsoft.AspNetCore.Server.IIS.CoreStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Server.IntegrationTesting (6)
Deployers\NginxDeployer.cs (6)
142.Replace("[user]", userName) 143.Replace("[errorlog]", errorLog) 144.Replace("[accesslog]", accessLog) 145.Replace("[listenPort]", originalUri.Port.ToString(CultureInfo.InvariantCulture) + (_portSelector != null ? " reuseport" : "")) 146.Replace("[redirectUri]", redirectUri) 147.Replace("[pidFile]", pidFile);
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISDeploymentParameterExtensions.cs (1)
230modulePath = modulePath.Replace("%IIS_BIN%", "%windir%\\System32\\inetsrv");
Microsoft.AspNetCore.Server.Kestrel.Core (3)
artifacts\obj\Microsoft.AspNetCore.Server.Kestrel.Core\Release\net10.0\Microsoft.AspNetCore.Server.Kestrel.Core.CoreStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\Microsoft.AspNetCore.Server.Kestrel.Core\Release\net10.0\Microsoft.AspNetCore.Server.SharedStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\Microsoft.AspNetCore.Server.Kestrel.Core\Release\net10.0\System.Net.Http.SR.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (8)
src\Servers\Kestrel\shared\KnownHeaders.cs (2)
454if ({byFirstTerm.Key.Replace(firstTermVarExpression, firstTermVar)}) 495_ => name.Replace("-", "")
src\Servers\Kestrel\shared\test\CertHelper.cs (2)
176return (protocol?.ToString() ?? "null").Replace(", ", "-"); 186name = name.Replace("_", string.Empty);
src\Servers\Kestrel\shared\test\StringExtensions.cs (4)
16.Replace("\r", @"\x0D") 17.Replace("\n", @"\x0A") 18.Replace("\0", @"\x00") 19.Replace("\x80", @"\x80")
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
artifacts\obj\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets\Release\net10.0\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketsStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Session (1)
artifacts\obj\Microsoft.AspNetCore.Session\Release\net10.0\Microsoft.AspNetCore.Session.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.Shared.Tests (2)
artifacts\obj\Microsoft.AspNetCore.Shared.Tests\Release\net10.0\Microsoft.AspNetCore.Server.SharedStrings.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\Microsoft.AspNetCore.Shared.Tests\Release\net10.0\System.Net.Http.SR.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (2)
HubClientProxyGenerator.Emitter.cs (2)
51var methodName = $"Register{typeSpec.FullyQualifiedTypeName.Replace(".", string.Empty)}"; 138private static System.IDisposable[] Register{typeSpec.FullyQualifiedTypeName.Replace(".", string.Empty)}(HubConnection connection, {typeSpec.FullyQualifiedTypeName} provider)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Docker.cs (1)
132output = output.Trim().Replace(Environment.NewLine, "");
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
src\Shared\SignalR\InProcessTestServer.cs (1)
55public override string WebSocketsUrl => Url.Replace("http", "ws");
Microsoft.AspNetCore.StaticFiles (1)
artifacts\obj\Microsoft.AspNetCore.StaticFiles\Release\net10.0\Microsoft.AspNetCore.StaticFiles.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.AspNetCore.WebSockets.ConformanceTests (3)
Autobahn\AutobahnTester.cs (2)
171var wsUrl = result.ApplicationBaseUri.Replace("https://", "wss://").Replace("http://", "ws://");
AutobahnTests.cs (1)
45outDir = outDir.Replace("\\", "\\\\");
Microsoft.AspNetCore.WebUtilities (1)
artifacts\obj\Microsoft.AspNetCore.WebUtilities\Release\net10.0\Microsoft.AspNetCore.WebUtilities.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.Build (26)
CommunicationsUtilities.cs (2)
192.Replace("/", "_") 193.Replace("=", string.Empty);
Construction\ProjectExtensionsElement.cs (1)
145idElement.InnerXml.Replace(ProjectRootElement.EmptyProjectFileXmlNamespace, string.Empty) != value)
Evaluation\Evaluator.cs (1)
2506importElement.Project.Replace(searchPathMatch.MsBuildPropertyFormat, extensionsPathPropValue),
Evaluation\Expander.cs (5)
3608ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidFunctionPropertyExpression", partiallyEvaluated, ex.Message.Replace("\r\n", " ")); 3679ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidFunctionPropertyExpression", partiallyEvaluated, ex.InnerException.Message.Replace("\r\n", " ")); 3690ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidFunctionStaticMethodSyntax", _expression, ex.Message.Replace("Microsoft.Build.Evaluation.IntrinsicFunctions.", "[MSBuild]::")); 4104string argument = args[n].ToString().Replace('|', ',').Replace(typeFullName, "").Replace(typeLeafName, "");
Evaluation\Expander\ArgumentParser.cs (2)
299comparisonTypeName = comparisonTypeName.Replace("System.StringComparison.", "").Replace("StringComparison.", "");
Evaluation\Expander\WellKnownFunctions.cs (1)
178returnVal = text.Replace(arg0, arg1);
Evaluation\IntrinsicFunctions.cs (2)
282viewAsString = viewAsString.Replace(typeFullName, "").Replace(typeLeafName, "");
Evaluation\Preprocessor.cs (4)
105destinationDocument.AppendChild(destinationDocument.CreateComment($"\r\n{Equals140}\r\n{_project.FullPath.Replace("--", "__")}\r\n{Equals140}\r\n")); 283string importProject = ((XmlElement)child).GetAttribute(XMakeAttributes.project).Replace("--", "__"); 316$"\r\n{Equals140}\r\n{importTag}\r\n\r\n{resolved.FullPath.Replace("--", "__")}\r\n{Equals140}\r\n")); 328destination.AppendChild(destinationDocument.CreateComment($"\r\n{Equals140}\r\n </Import>\r\n\r\n{_filePaths.Peek()?.Replace("--", "__")}\r\n{Equals140}\r\n"));
Evaluation\Profiler\EvaluationLocationMarkdownPrettyPrinter.cs (1)
41text = text.Replace(Separator, $"\\{Separator}");
Evaluation\Profiler\EvaluationLocationPrettyPrinterBase.cs (1)
66outerXml = outerXml.Replace(@"xmlns=""http://schemas.microsoft.com/developer/msbuild/2003""", "");
Evaluation\Profiler\EvaluationLocationTabSeparatedPrettyPrinter.cs (1)
41return text.Replace(Separator, " ");
Logging\BinaryLogger\ProjectImportsCollector.cs (3)
258archivePath = archivePath.Replace(":", ""); 259archivePath = archivePath.Replace("\\\\", "\\"); 260archivePath = archivePath.Replace("/", "\\");
Logging\DistributedLoggers\DistributedFileLogger.cs (1)
114fileName = _logFile.Replace(extension, _nodeId + extension);
PrintLineDebuggerWriters.cs (1)
103return s.Replace(",", ";");
Microsoft.Build.BuildCheck.UnitTests (8)
EndToEndTests.cs (8)
193text = text.Replace(original, replacement); 203Directory.CreateDirectory(dirPath.Replace(sourcePath, targetPath)); 209File.Copy(newPath, newPath.Replace(sourcePath, targetPath), true); 402text = text.Replace(original, replacement); 1050.Replace("TestFilePath", testFile.Path) 1051.Replace("WorkFolderPath", workFolder.Path); 1087configContent = configContent.Replace($"build_check.{rule.RuleId}.Severity={rule.RuleId}Severity", $"build_check.{rule.RuleId}.Severity={rule.Severity}"); 1098configContent = configContent.Replace($"build_check.{rule.RuleId}.CustomConfig=dummy", $"build_check.{rule.RuleId}.{rule.CustomConfig.ConfigKey}={rule.CustomConfig.Value}");
Microsoft.Build.CommandLine.UnitTests (2)
XMake_Tests.cs (2)
2596".Replace("'", "\""); 2722arguments = arguments.Replace("/bl", $"/bl:{binlogPath}");
Microsoft.Build.Engine.OM.UnitTests (14)
Construction\ElementLocationPublic_Tests.cs (1)
148locations = locations.Replace(project.FullPath, "c:\\foo\\bar.csproj");
Construction\ProjectRootElement_Tests.cs (1)
365content = content.Replace("`", "\"");
Definition\ProjectItem_Tests.cs (1)
452IList<ProjectItem> items = ObjectModelHelpers.GetItemsFromFragment(itemDefinition.Replace("somedir", directory.Path), allItems: false, ignoreCondition: true);
Definition\ProtectImports_Tests.cs (10)
503string expanded = original.Replace("$importFilename", _importFilename); 504expanded = expanded.Replace("$importedMetadataName", ImportedMetadataName); 505expanded = expanded.Replace("$importedMetadataValue", ImportedMetadataValue); 506expanded = expanded.Replace("$itemName", ItemName); 507expanded = expanded.Replace("$itemType", ItemType); 508expanded = expanded.Replace("$projectMetadataName", ProjectMetadataName); 509expanded = expanded.Replace("$overridableMetadataName", OverridableMetadataName); 510expanded = expanded.Replace("$nonOverridableMetadataName", NonOverridableMetadataName); 511expanded = expanded.Replace("$projectMetadataValue", ProjectMetadataValue); 512expanded = expanded.Replace("$propertyName", PropertyName);
PrintLineDebuggerWriters.cs (1)
103return s.Replace(",", ";");
Microsoft.Build.Engine.UnitTests (71)
BackEnd\BuildRequestConfiguration_Tests.cs (2)
543glob = glob.Replace(@"c:\", "/").ToSlash(); 544referencePath = referencePath.Replace(@"c:\", "/").ToSlash();
BackEnd\NodePackets_Tests.cs (1)
2193=3value".Replace("\r\n", "\n"), result.Message);
BackEnd\TargetBuilder_Tests.cs (2)
229var logText = logger.FullLog.Replace("\r\n", "\n"); 237Done building target ""Build"" in project ""build.proj"".".Replace("\r\n", "\n");
BackEnd\TargetUpToDateChecker_Tests.cs (5)
318using ProjectFromString projectFromString = new(projectText.Replace("`", "\"")); 347using ProjectFromString projectFromString = new(projectText.Replace("`", "\"")); 376using ProjectFromString projectFromString = new(projectText.Replace("`", "\"")); 406using ProjectFromString projectFromString = new(projectText.Replace("`", "\"")); 441using ProjectFromString projectFromString = new(projectText.Replace("`", "\""));
BackEnd\TaskBuilder_Tests.cs (2)
146string unescapedSleepCommand = sleepCommand.Replace("&quot;", "\"").Replace("&gt;", ">");
ConsoleLogger_Tests.cs (2)
1644message = message.Replace("\r\n", "\n").Replace("\n", Environment.NewLine);
ConsoleOutputAlignerTests.cs (16)
123output.ShouldBe(expected.Replace("\n", Environment.NewLine)); 146input = input.Replace("\n", Environment.NewLine); 168expected = expected.Replace("\n", Environment.NewLine) + Environment.NewLine; 183input = input.Replace("\n", Environment.NewLine); 206string expected = input.Replace("\r", "").Replace("\n", Environment.NewLine) + Environment.NewLine; 220input = input.Replace("\n", Environment.NewLine); 221expected = expected.Replace("\n", Environment.NewLine); 234input = input.Replace("\n", Environment.NewLine); 235expected = expected.Replace("\n", Environment.NewLine); 248input = input.Replace("\n", Environment.NewLine); 263input = input.Replace("\n", Environment.NewLine); 278input = input.Replace("\n", Environment.NewLine); 293input = input.Replace("\n", Environment.NewLine); 369input = input.Replace("\n", Environment.NewLine); 370expected = expected.Replace("\n", Environment.NewLine);
Construction\ElementLocation_Tests.cs (1)
446return locations.Replace(file, "c:\\foo\\bar.csproj");
Construction\SolutionFilter_Tests.cs (5)
215TransientTestFile slnf = testEnvironment.CreateFile(folder, "Dev.slnf", slnfValue.Replace(@"C:\\notAPath\\MSBuild.Dev.sln", sln.Path.Replace("\\", "\\\\"))); 268""path"": """ + (convertToSlnx ? ConvertToSlnx(sln.Path) : sln.Path).Replace("\\", "\\\\") + @""", 270""" + Path.Combine("src", Path.GetFileName(microsoftBuild.Path)!).Replace("\\", "\\\\") + @""", 271""" + Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)!).Replace("\\", "\\\\") + @"""
Construction\SolutionProjectGenerator_Tests.cs (1)
914""".Replace("##temp##", FileUtilities.TempFileDirectory);
Definition\ToolsVersion_Tests.cs (2)
967string finalPattern = "^" + pattern.Replace(".", "\\.").Replace("*", "[\\w\\W]*") + "$";
Evaluation\Evaluator_Tests.cs (1)
80<Import {importParameter.Replace("realFolder", existentDirectory.Path)} />
Evaluation\Expander_Tests.cs (2)
2880.Replace("$$platform$$", platform) 2881.Replace("$$architecture$$", architecture);
Evaluation\Preprocessor_Tests.cs (16)
25private static string CurrentDirectoryXmlCommentFriendly => Directory.GetCurrentDirectory().Replace("--", "__"); 731string directoryXmlCommentFriendly = directory.Replace("--", "__"); 896{sdkPropsPath.Replace("--", "__")} 917{sdkTargetsPath.Replace("--", "__")} 1002{projectPath.Replace("--", "__")} 1010{virtualProjectPath.Replace("--", "__")} 1030{importedPropsPath.Replace("--", "__")} 1040{projectPath.Replace("--", "__")} 1124{sdkPropsPath1.Replace("--", "__")} 1139<Import Project=""{importPath.Replace("--", "__")}""> 1141{importPath.Replace("--", "__")} 1149{sdkPropsPath2.Replace("--", "__")} 1159{importPath.Replace("--", "__")} 1170{sdkTargetsPath2.Replace("--", "__")} 1180{importPath.Replace("--", "__")} 1198{sdkTargetsPath1.Replace("--", "__")}
FileMatcher_Tests.cs (8)
2228normalized = path.Replace("\\", Path.DirectorySeparatorChar.ToString()); 2237normalized = normalized.Replace(@".." + Path.DirectorySeparatorChar, "<:PARENT:>"); 2241normalized = normalized.Replace(doubleSeparator, Path.DirectorySeparatorChar.ToString()); 2242normalized = normalized.Replace(doubleSeparator, Path.DirectorySeparatorChar.ToString()); 2243normalized = normalized.Replace(doubleSeparator, Path.DirectorySeparatorChar.ToString()); 2246normalized = normalized.Replace(@"." + Path.DirectorySeparatorChar, ""); 2249normalized = normalized.Replace("<:UNC:>", @"\\"); 2250normalized = normalized.Replace("<:PARENT:>", @".." + Path.DirectorySeparatorChar);
Globbing\MSBuildGlob_Tests.cs (2)
318return Path.Combine(Directory.GetCurrentDirectory(), expectedFixedDirectoryPart).Replace("/", "\\").WithTrailingSlash(); 359return NativeMethodsShared.IsWindows ? normalizedPath.Replace("\\\\", "\\") : normalizedPath;
Graph\IsolateProjects_Tests.cs (2)
462Func<string, string> ToDuplicateSlashes = path => path.Replace("/", "//").Replace(@"\", @"\\");
TerminalLogger_Tests.cs (1)
511$"㐇𠁠𪨰𫠊𫦠𮚮⿕ -> {_projectFileWithNonAnsiSymbols.Replace("proj", "dll")}",
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
580.Replace("/", "_") 581.Replace("=", string.Empty);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (6)
DotNetSdkTests.cs (6)
34var escapedRoot1 = root1.Replace(",", ",,").Replace("=", "=="); 35var escapedRoot2 = root2.Replace(",", ",,").Replace("=", "=="); 36var escapedRoot3 = root3.Replace(",", ",,").Replace("=", "==");
Microsoft.Build.Tasks.Core (19)
BootstrapperUtil\BootstrapperBuilder.cs (1)
1979return str.Replace("%NEWLINE%", Environment.NewLine);
Exec.cs (1)
78_command = _command.Replace("\r\n", "\n");
GenerateResource.cs (4)
3819value = value.Replace("\\", "\\\\"); 3820value = value.Replace("\n", "\\n"); 3821value = value.Replace("\r", "\\r"); 3822value = value.Replace("\t", "\\t");
GetSDKReferenceFiles.cs (12)
316Log.LogMessageFromResources(MessageImportance.Low, "GetSDKReferenceFiles.ExpandRedistFrom", path.Replace(resolvedSDKReference.ItemSpec, String.Empty)); 337Log.LogMessageFromResources("GetSDKReferenceFiles.AddingRedistFile", redist.RedistFile.Replace(redist.SDKReferenceItem.ItemSpec, String.Empty), redist.TargetPath); 390Log.LogMessageFromResources(MessageImportance.Low, "GetSDKReferenceFiles.ExpandReferencesFrom", path.Replace(resolvedSDKReference.ItemSpec, String.Empty)); 411Log.LogMessageFromResources("GetSDKReferenceFiles.AddingReference", reference.AssemblyLocation.Replace(reference.SDKReferenceItem.ItemSpec, String.Empty)); 599Log.LogMessageFromResources("GetSDKReferenceFiles.ConflictReferenceSameSDK", winner.SDKReferenceItem.GetMetadata("OriginalItemSpec"), winner.AssemblyLocation.Replace(winner.SDKReferenceItem.ItemSpec, String.Empty), resolvedReference.AssemblyLocation.Replace(resolvedReference.SDKReferenceItem.ItemSpec, String.Empty)); 603string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("GetSDKReferenceFiles.ConflictReferenceSameSDK", winner.SDKReferenceItem.GetMetadata("OriginalItemSpec"), winner.AssemblyLocation.Replace(winner.SDKReferenceItem.ItemSpec, String.Empty), resolvedReference.AssemblyLocation.Replace(resolvedReference.SDKReferenceItem.ItemSpec, String.Empty)); 639Log.LogMessageFromResources("GetSDKReferenceFiles.ConflictRedistSameSDK", redistFile.TargetPath, redistFile.SDKReferenceItem.GetMetadata("OriginalItemSpec"), winner.RedistFile.Replace(redistFile.SDKReferenceItem.ItemSpec, String.Empty), redistFile.RedistFile.Replace(redistFile.SDKReferenceItem.ItemSpec, String.Empty)); 643string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("GetSDKReferenceFiles.ConflictRedistSameSDK", redistFile.TargetPath, redistFile.SDKReferenceItem.GetMetadata("OriginalItemSpec"), winner.RedistFile.Replace(redistFile.SDKReferenceItem.ItemSpec, String.Empty), redistFile.RedistFile.Replace(redistFile.SDKReferenceItem.ItemSpec, String.Empty));
PrintLineDebuggerWriters.cs (1)
103return s.Replace(",", ";");
Microsoft.Build.Tasks.UnitTests (67)
AddToWin32Manifest_Tests.cs (2)
139static string NormalizeLineEndings(string input) => input.Replace("\r\n", "\n").Replace("\r", "\n");
CodeTaskFactoryEmbeddedFileInBinlogTestHelper.cs (4)
71projectDirectoryPath = NativeMethodsShared.IsWindows ? projectDirectoryPath.Replace(":\\", "\\") : projectDirectoryPath.Replace("/", "\\"); 123projectDirectory = NativeMethodsShared.IsWindows ? projectDirectory.Replace(":\\", "\\") : projectDirectory.Replace("/", "\\");
GetSDKReference_Tests.cs (57)
675engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[0].ItemSpec.Replace(t.References[0].GetMetadata("SDKRootPath"), String.Empty)); 676engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[1].ItemSpec.Replace(t.References[1].GetMetadata("SDKRootPath"), String.Empty)); 677engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[2].ItemSpec.Replace(t.References[2].GetMetadata("SDKRootPath"), String.Empty)); 678engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[3].ItemSpec.Replace(t.References[3].GetMetadata("SDKRootPath"), String.Empty)); 679engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[4].ItemSpec.Replace(t.References[4].GetMetadata("SDKRootPath"), String.Empty)); 680engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[5].ItemSpec.Replace(t.References[5].GetMetadata("SDKRootPath"), String.Empty)); 681engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[6].ItemSpec.Replace(t.References[6].GetMetadata("SDKRootPath"), String.Empty)); 682engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[7].ItemSpec.Replace(t.References[7].GetMetadata("SDKRootPath"), String.Empty)); 724engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[0].ItemSpec.Replace(t.References[0].GetMetadata("SDKRootPath"), String.Empty)); 725engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[1].ItemSpec.Replace(t.References[1].GetMetadata("SDKRootPath"), String.Empty)); 726engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[2].ItemSpec.Replace(t.References[2].GetMetadata("SDKRootPath"), String.Empty)); 727engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[3].ItemSpec.Replace(t.References[3].GetMetadata("SDKRootPath"), String.Empty)); 728engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[4].ItemSpec.Replace(t.References[4].GetMetadata("SDKRootPath"), String.Empty)); 816engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[0].ItemSpec.Replace(t.References[0].GetMetadata("SDKRootPath"), String.Empty)); 817engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[1].ItemSpec.Replace(t.References[1].GetMetadata("SDKRootPath"), String.Empty)); 818engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[2].ItemSpec.Replace(t.References[2].GetMetadata("SDKRootPath"), String.Empty)); 819engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[3].ItemSpec.Replace(t.References[3].GetMetadata("SDKRootPath"), String.Empty)); 820engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[4].ItemSpec.Replace(t.References[4].GetMetadata("SDKRootPath"), String.Empty)); 821engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[5].ItemSpec.Replace(t.References[5].GetMetadata("SDKRootPath"), String.Empty)); 822engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[6].ItemSpec.Replace(t.References[6].GetMetadata("SDKRootPath"), String.Empty)); 823engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[7].ItemSpec.Replace(t.References[7].GetMetadata("SDKRootPath"), String.Empty)); 868engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[0].ItemSpec.Replace(t.References[0].GetMetadata("SDKRootPath"), String.Empty)); 869engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[1].ItemSpec.Replace(t.References[1].GetMetadata("SDKRootPath"), String.Empty)); 870engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[2].ItemSpec.Replace(t.References[2].GetMetadata("SDKRootPath"), String.Empty)); 871engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[3].ItemSpec.Replace(t.References[3].GetMetadata("SDKRootPath"), String.Empty)); 872engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[4].ItemSpec.Replace(t.References[4].GetMetadata("SDKRootPath"), String.Empty)); 873engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[5].ItemSpec.Replace(t.References[5].GetMetadata("SDKRootPath"), String.Empty)); 874engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[6].ItemSpec.Replace(t.References[6].GetMetadata("SDKRootPath"), String.Empty)); 875engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[7].ItemSpec.Replace(t.References[7].GetMetadata("SDKRootPath"), String.Empty)); 919engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[0].ItemSpec.Replace(t.References[0].GetMetadata("SDKRootPath"), String.Empty)); 920engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[1].ItemSpec.Replace(t.References[1].GetMetadata("SDKRootPath"), String.Empty)); 921engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[2].ItemSpec.Replace(t.References[2].GetMetadata("SDKRootPath"), String.Empty)); 922engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[3].ItemSpec.Replace(t.References[3].GetMetadata("SDKRootPath"), String.Empty)); 923engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[4].ItemSpec.Replace(t.References[4].GetMetadata("SDKRootPath"), String.Empty)); 924engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[5].ItemSpec.Replace(t.References[5].GetMetadata("SDKRootPath"), String.Empty)); 925engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[6].ItemSpec.Replace(t.References[6].GetMetadata("SDKRootPath"), String.Empty)); 926engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[7].ItemSpec.Replace(t.References[7].GetMetadata("SDKRootPath"), String.Empty)); 957engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[0].ItemSpec.Replace(t.RedistFiles[0].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[0].GetMetadata("TargetPath")); 958engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[1].ItemSpec.Replace(t.RedistFiles[1].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[1].GetMetadata("TargetPath")); 959engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[2].ItemSpec.Replace(t.RedistFiles[2].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[2].GetMetadata("TargetPath")); 960engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[3].ItemSpec.Replace(t.RedistFiles[3].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[3].GetMetadata("TargetPath")); 961engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[4].ItemSpec.Replace(t.RedistFiles[4].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[4].GetMetadata("TargetPath")); 1018engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[0].ItemSpec.Replace(t.RedistFiles[0].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[0].GetMetadata("TargetPath")); 1019engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[1].ItemSpec.Replace(t.RedistFiles[1].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[1].GetMetadata("TargetPath")); 1020engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[2].ItemSpec.Replace(t.RedistFiles[2].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[2].GetMetadata("TargetPath")); 1021engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[3].ItemSpec.Replace(t.RedistFiles[3].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[3].GetMetadata("TargetPath")); 1022engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[4].ItemSpec.Replace(t.RedistFiles[4].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[4].GetMetadata("TargetPath")); 1050engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[0].ItemSpec.Replace(t.RedistFiles[0].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[0].GetMetadata("TargetPath")); 1051engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[1].ItemSpec.Replace(t.RedistFiles[1].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[1].GetMetadata("TargetPath")); 1052engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[2].ItemSpec.Replace(t.RedistFiles[2].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[2].GetMetadata("TargetPath")); 1053engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[3].ItemSpec.Replace(t.RedistFiles[3].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[3].GetMetadata("TargetPath")); 1054engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[4].ItemSpec.Replace(t.RedistFiles[4].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[4].GetMetadata("TargetPath")); 1082engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[0].ItemSpec.Replace(t.RedistFiles[0].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[0].GetMetadata("TargetPath")); 1083engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[1].ItemSpec.Replace(t.RedistFiles[1].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[1].GetMetadata("TargetPath")); 1084engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[2].ItemSpec.Replace(t.RedistFiles[2].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[2].GetMetadata("TargetPath")); 1085engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[3].ItemSpec.Replace(t.RedistFiles[3].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[3].GetMetadata("TargetPath")); 1086engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[4].ItemSpec.Replace(t.RedistFiles[4].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[4].GetMetadata("TargetPath"));
ResolveAssemblyReference_CustomCultureTests.cs (3)
46.Replace("OutputPathPlaceholder", projBOutputPath) 47.Replace("NonCultureResourceDirectoriesPlaceholder", customCultureExclusions) 48.Replace("EnableCustomCulturePlaceholder", enableCustomCulture.ToString());
RoslynCodeTaskFactory_Tests.cs (1)
203text1 = text1.Replace("p2.proj", p2.ProjectFile);
Microsoft.Build.UnitTests.Shared (2)
BuildEventArgsExtension.cs (2)
61string fixedArgsMessage = args.Message.Replace("\r\nThis is an unhandled exception from a task -- PLEASE OPEN A BUG AGAINST THE TASK OWNER.", String.Empty); 62string fixedOtherMessage = other.Message.Replace("\r\nThis is an unhandled exception from a task -- PLEASE OPEN A BUG AGAINST THE TASK OWNER.", String.Empty);
Microsoft.Build.Utilities.Core (4)
CommandLineBuilder.cs (2)
278unquotedTextToAppend = unquotedTextToAppend.Replace("\\\"", "\\\\\""); 280unquotedTextToAppend = unquotedTextToAppend.Replace("\"", "\\\"");
PrintLineDebuggerWriters.cs (1)
103return s.Replace(",", ";");
ToolTask.cs (1)
1468batchFileForCommandLine = batchFileForCommandLine.Replace("&", "^&");
Microsoft.Build.Utilities.UnitTests (2)
MuxLogger_Tests.cs (2)
129mockLogger.FullLog.Replace(Environment.NewLine, "").ShouldBe(mockLogger2.FullLog.Replace(Environment.NewLine, ""));
Microsoft.Cci.Extensions (2)
Writers\CSharp\CSDeclarationWriter.Fields.cs (2)
65name = name.Replace("<", "_").Replace(">", "_");
Microsoft.CodeAnalysis (4)
CommandLine\SarifErrorLogger.cs (1)
151path = path.Replace(@"\\", @"\");
DiagnosticAnalyzer\AnalyzerFileReference.cs (2)
206string message = e.Message.Replace("\r", "").Replace("\n", "");
WellKnownTypes.cs (1)
742typeIdName = typeId.ToString().Replace("__", "+").Replace('_', '.');
Microsoft.CodeAnalysis.CodeStyle (11)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (2)
86var reformattedCopyrightTextParts = expectedFileHeader.Replace("\r\n", "\n").Split('\n'); 87var fileHeaderCopyrightTextParts = copyrightText.Replace("\r\n", "\n").Split('\n');
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (1)
78var triviaStringParts = commentText.Span.Trim().ToString().Replace("\r\n", "\n").Split('\n');
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
160relativePath = relativePath.Replace("\\", "/");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
505_startToken.ToString().Replace("\r\n", "\\r\\n"), 506_endToken.ToString().Replace("\r\n", "\\r\\n"));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (4)
18=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 21=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
241_stringBuilder.Append(value.Replace("\"", "\"\""));
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (2)
77var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(document.FilePath)); 208copyrightText = copyrightText.Replace("\r\n", "\n");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
129comment = string.Concat(commentStarter, "\r\n", commentStarter, xml!.Replace("\n", newLineStarter));
Microsoft.CodeAnalysis.CSharp (3)
Compiler\DocumentationCommentCompiler.cs (2)
1150return "!:" + tmp.ToString().Replace("{", "&lt;").Replace("}", "&gt;");
Symbols\Source\SourcePropertySymbolBase.cs (1)
522return SourceName.Replace(" ", "");
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
487=> triviaList.Sum(t => t.ToFullString().Replace("\r\n", "\r").Cast<char>().Count(c => SyntaxFacts.IsNewLine(c)));
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (12)
src\Analyzers\CSharp\Tests\GenerateDefaultConstructors\GenerateDefaultConstructorsTests.cs (3)
63TestCode = source.Replace("[||]", ""), 89source = source.Replace("[||]", ""); 956TestCode = source.Replace("[||]", ""),
src\Analyzers\CSharp\Tests\UseCompoundAssignment\UseCompoundAssignmentTests.cs (4)
1283var before = expressionContext.Replace("$$", "i [|=|] i + 1"); 1284var after = expressionContext.Replace("$$", "++i"); 1310var before = expressionContext.Replace("$$", "i [|=|] i + 1"); 1311var after = expressionContext.Replace("$$", "++i");
src\Analyzers\CSharp\Tests\UseSystemThreadingLock\UseSystemThreadingLockTests.cs (5)
231""" + SystemThreadingLockTypePolyFill.Replace("public", "internal"), 254""" + SystemThreadingLockTypePolyFill.Replace(" Scope", " Scope1"), 278.Replace("public ref struct", "private ref struct") 279.Replace("public Scope", "private Scope"), 302""" + SystemThreadingLockTypePolyFill.Replace("public ref struct", "public struct"),
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (8)
CommandLineTests.cs (6)
76s_CSharpScriptExecutable = s_CSharpCompilerExecutable.Replace("csc.dll", Path.Combine("csi", "csi.dll")); 1239parsedArgs.SourceFiles.Select((file) => file.Path.Replace(dir.ToString(), "{DIR}"))); 1244parsedArgs.SourceFiles.Select((file) => file.Path.Replace(dir.ToString(), "{DIR}"))); 6007.Replace(Environment.NewLine, string.Empty), workingDirectory: tempDir) : 6042.Replace(Environment.NewLine, string.Empty), workingDirectory: tempDir) : 6122.Replace(Environment.NewLine, string.Empty)) :
SarifV2ErrorLoggerTests.cs (2)
713Assert.Equal($"file:///{mappedDir.Path.Replace(@"\", "/")}/otherfile.cs", (string)resultFile["uri"]); 739Assert.Equal(expected: $"file:///{mappedDir.Path.Replace(@"\", "/")}/otherfile.cs", (string)physicalLocation["artifactLocation"]["uri"]);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (71)
CodeActions\InitializeParameter\AddParameterCheckTests.cs (21)
584throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(a)}").Replace(""" 593throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(b)}").Replace(""" 602throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(c)}").Replace(""" 678throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(a)}").Replace(""" 687throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(b)}").Replace(""" 741throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(a)}").Replace(""" 750throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(c)}").Replace(""" 787throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(a)}").Replace(""" 796throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(c)}").Replace(""" 834throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(a)}").Replace(""" 848throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(c)}").Replace(""" 1970throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2008throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_whitespace, "{nameof(s)}").Replace(""" 2079throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2135throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(bar)}").Replace(""" 2728throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2770throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2813throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2855if (string.IsNullOrEmpty(s)) throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2896if (string.IsNullOrEmpty(s)) throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2939throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace("""
CodeActions\InlineMethod\CSharpInlineMethodTests.cs (4)
2946""".Replace("(op)", op), 2961""".Replace("(op)", op)); 3013""".Replace("(op)", op), 3028""".Replace("(op)", op));
CompleteStatement\CSharpCompleteStatementCommandHandlerTests.cs (2)
276var expected = CreateTestWithMethodCall($@"var test = Console.WriteLine({argument.Replace("$$", "")});$$"); 5100var expected = code.Replace("$$", ";$$");
Completion\CompletionProviders\LoadDirectiveCompletionProviderTests.cs (1)
82var text = textWithPositionMarker.Replace("$$", "");
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (1)
123var text = textWithPositionMarker.Replace("$$", "");
Completion\CompletionProviders\SymbolCompletionProviderTests.cs (2)
11398return template.Replace("[1]", lambdaExpressionString).Replace("[2]", methodDeclarationString);
Completion\CompletionServiceTests.cs (1)
221document = document.WithText(SourceText.From(sourceMarkup.Replace("C1", "C2")));
Formatting\Indentation\SmartIndenterEnterOnTokenTests.cs (2)
1388await AssertIndentUsingSmartTokenFormatterAsync(code.Replace(" ", "\t"), ch, indentationLine, expectedIndentation, useTabs: true).ConfigureAwait(false); 1428await AssertIndentNotUsingSmartTokenFormatterButUsingIndenterAsync(code.Replace(" ", "\t"), indentationLine, expectedIndentation, useTabs: true, indentStyle).ConfigureAwait(false);
Formatting\Indentation\SmartIndenterTests.cs (3)
3524AssertSmartIndentInProjection(markup.Replace(" ", "\t"), expectedIndentation, useTabs: true, options, indentStyle); 3579AssertSmartIndent(code.Replace(" ", "\t"), indentationLine, expectedIndentation, useTabs: true, options, indentStyle); 3609AssertSmartIndent(code.Replace(" ", "\t"), expectedIndentation, useTabs: true, options, indentStyle);
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (4)
3374markup = markup.Replace(" ", "\t"); 3375expected = expected.Replace(" ", "\t"); 3407await AutoFormatOnMarkerAsync(initialMarkup.Replace(" ", "\t"), expected.Replace(" ", "\t"), useTabs: true, tokenKind, startTokenKind).ConfigureAwait(false);
Formatting\Indentation\SmartTokenFormatterFormatTokenTests.cs (12)
461actualIndentation = await GetSmartTokenFormatterIndentationAsync(code.Replace(" ", "\t"), indentationLine: 5, ch: '#', useTabs: true); 480actualIndentation = await GetSmartTokenFormatterIndentationAsync(code.Replace(" ", "\t"), indentationLine: 5, ch: 'n', useTabs: true); 500actualIndentation = await GetSmartTokenFormatterIndentationAsync(code.Replace(" ", "\t"), indentationLine: 5, ch: 'n', useTabs: true); 524actualIndentation = await GetSmartTokenFormatterIndentationAsync(code.Replace(" ", "\t"), indentationLine: 9, ch: 't', useTabs: true); 548actualIndentation = await GetSmartTokenFormatterIndentationAsync(code.Replace(" ", "\t"), indentationLine: 9, ch: 'e', useTabs: true); 555await AssertSmartTokenFormatterOpenBraceWithBaseIndentationAsync(markup.Replace(" ", "\t"), baseIndentation, expectedIndentation, useTabs: true).ConfigureAwait(false); 580await AssertSmartTokenFormatterOpenBraceAsync(code.Replace(" ", "\t"), indentationLine, expectedSpace, useTabs: true, baseIndentation, span).ConfigureAwait(false); 601await AssertSmartTokenFormatterOpenBraceAsync(expected.Replace(" ", "\t"), code.Replace(" ", "\t"), indentationLine, useTabs: true).ConfigureAwait(false); 622await AssertSmartTokenFormatterCloseBraceWithBaseIndentation(markup.Replace(" ", "\t"), baseIndentation, expectedIndentation, useTabs: true).ConfigureAwait(false); 647await AssertSmartTokenFormatterCloseBraceAsync(code.Replace(" ", "\t"), indentationLine, expectedSpace, useTabs: true, baseIndentation, span).ConfigureAwait(false); 667await ExpectException_SmartTokenFormatterCloseBraceAsync(code.Replace(" ", "\t"), indentationLine, useTabs: true).ConfigureAwait(false);
RawStringLiteral\RawStringLiteralCommandHandlerTests.cs (2)
52expectedCode = expectedCode.Replace("$", "\uD7FF"); 59massaged = massaged.Replace("\uD7FF", "$");
SignatureHelp\InvocationExpressionSignatureHelpProviderTests.cs (6)
1856await TestAsync(markup.Replace("ARGUMENTS", arguments), [new SignatureHelpTestItem("void Program.M(int i1, int i2, int i3)", currentParameterIndex: expectedParameterIndex, isSelected: true)]); 1881await TestAsync(markup.Replace("ARGUMENTS", arguments), [new SignatureHelpTestItem("void Delegate(int i1, int i2, int i3)", currentParameterIndex: expectedParameterIndex, isSelected: true)]); 1915await TestAsync(markup.Replace("ARGUMENTS", arguments), [ 1940await TestAsync(markup.Replace("ARGUMENTS", arguments), [new SignatureHelpTestItem($"void Program.M(string s, string s2)", currentParameterIndex: expectedParameterIndex, isSelected: true)]); 1974await TestAsync(markup.Replace("ARGUMENTS", arguments), [new SignatureHelpTestItem("void Program.M(int i1, params int[] i2)", currentParameterIndex: expectedParameterIndex, isSelected: true)]); 2030await TestAsync(markup.Replace("ARGUMENTS", arguments), [new SignatureHelpTestItem("void Program.M(int i, string s)", currentParameterIndex: expectedParameterIndex, isSelected: true)]);
SignatureHelp\ObjectCreationExpressionSignatureHelpProviderTests.cs (2)
802await TestAsync(markup.Replace("ARGUMENTS", arguments), [ 827await TestAsync(markup.Replace("ARGUMENTS", arguments),
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (2)
160expectedMarkup = expectedMarkup.Replace("$", NON_TEST_CHARACTER); 164expected = expected.Replace(NON_TEST_CHARACTER, "$");
StringIndentation\StringIndentationTests.cs (2)
28files: [contents.Replace("|", " ")], 36var actual = ApplyRegions(contents.Replace("|", " "), regions);
SymbolKey\SymbolKeyTests.cs (2)
149""".Replace("<", "&lt;").Replace(">", "&gt;");
TypeInferrer\TypeInferrerTests.cs (2)
54""".Replace("$", text); 68""".Replace("$", text);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (34)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (4)
73var actualTree = TreeToText(tree).Replace("\"", "\"\""); 74AssertEx.Equal(expectedTree!.Replace("\"", "\"\""), actualTree); 81var actualDiagnostics = DiagnosticsToText(tree.Diagnostics).Replace("\"", "\"\""); 82AssertEx.Equal(RemoveMessagesInNonSupportedLanguage(expectedDiagnostics).Replace("\"", "\"\""), actualDiagnostics);
EmbeddedLanguages\Json\CSharpJsonParserTests_NstTests.cs (2)
20var actualTree = TreeToText(tree!).Replace("\"", "\"\""); 21Assert.Equal(expected.Replace("\"", "\"\""), actualTree);
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (2)
51.Replace("&quot;", "\""); 145Assert.False(true, "Expected diagnostics: \r\n" + expectedDiagnostics.ToString().Replace(@"""", @""""""));
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests_BasicTests.cs (15)
2061<Diagnostic Message="{{FeaturesResources.Illegal_x_y_with_x_less_than_y.Replace(">", "&gt;")}}" Span="[13..14)" Text="0" /> 4721<Diagnostic Message="{FeaturesResources.Malformed_named_back_reference.Replace("<", "&lt;").Replace(">", "&gt;")}" Span="[10..12)" Text="\k" /> 4750<Diagnostic Message="{FeaturesResources.Malformed_named_back_reference.Replace("<", "&lt;").Replace(">", "&gt;")}" Span="[10..12)" Text="\k" /> 4779<Diagnostic Message="{FeaturesResources.Malformed_named_back_reference.Replace("<", "&lt;").Replace(">", "&gt;")}" Span="[10..12)" Text="\k" /> 5048<Diagnostic Message="{FeaturesResources.Malformed_named_back_reference.Replace("<", "&lt;").Replace(">", "&gt;")}" Span="[10..12)" Text="\k" /> 5077<Diagnostic Message="{FeaturesResources.Malformed_named_back_reference.Replace("<", "&lt;").Replace(">", "&gt;")}" Span="[10..12)" Text="\k" /> 5106<Diagnostic Message="{FeaturesResources.Malformed_named_back_reference.Replace("<", "&lt;").Replace(">", "&gt;")}" Span="[10..12)" Text="\k" /> 5268<Diagnostic Message="{FeaturesResources.Malformed_named_back_reference.Replace("<", "&lt;").Replace(">", "&gt;")}" Span="[10..12)" Text="\k" />
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests_DotnetNegativeTests.cs (10)
119<Diagnostic Message="{FeaturesResources.Malformed_named_back_reference.Replace("<", "&lt;").Replace(">", "&gt;")}" Span="[10..12)" Text="\k" /> 145<Diagnostic Message="{FeaturesResources.Malformed_named_back_reference.Replace("<", "&lt;").Replace(">", "&gt;")}" Span="[10..12)" Text="\k" /> 4260<Diagnostic Message="{FeaturesResources.Malformed_named_back_reference.Replace("<", "&lt;").Replace(">", "&gt;")}" Span="[35..37)" Text="\k" /> 5263<Diagnostic Message="{FeaturesResources.Malformed_named_back_reference.Replace("<", "&lt;").Replace(">", "&gt;")}" Span="[35..37)" Text="\k" /> 5329<Diagnostic Message="{FeaturesResources.Malformed_named_back_reference.Replace("<", "&lt;").Replace(">", "&gt;")}" Span="[35..37)" Text="\k" />
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests_RealWorld.cs (1)
46var pattern = obj.Value<string>("Pattern")!.Replace(@"""", @"""""");
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (107)
CodeGen\CodeGenAsyncIteratorTests.cs (5)
88return runner.Replace("ITERATIONS", iterations.ToString()); 5568var source = template.Replace("POSITION", position.ToString()); 5661var source = template.Replace("POSITION", position.ToString()); 7557var comp = CreateCompilationWithAsyncIterator(new[] { source.Replace("SOURCETOCANCEL", sourceToCancel), EnumeratorCancellationAttributeType }, options: options); 7617var comp = CreateCompilationWithAsyncIterator(new[] { source.Replace("SOURCETOCANCEL", sourceToCancel), EnumeratorCancellationAttributeType }, options: options, parseOptions: TestOptions.Regular9);
CodeGen\CodeGenAsyncMethodBuilderOverrideTests.cs (58)
362.Replace("public static IgnoredTaskMethodBuilder Create() => new IgnoredTaskMethodBuilder(new MyTask());", "public static int Create() => 0;")} 365.Replace("public static IgnoredTaskMethodBuilder<T> Create() => new IgnoredTaskMethodBuilder<T>(new MyTask<T>());", "public static int Create() => 0;")} 400.Replace("public MyTask Task => _task;", "public int Task => 0;")} 403.Replace("public MyTask<T> Task => _task;", "public int Task => 0;")} 438.Replace("public void SetException", "internal void SetException") 439.Replace("public void SetResult", "internal void SetResult")} 442.Replace("public void SetException", "internal void SetException") 443.Replace("public void SetResult", "internal void SetResult")} 478.Replace("public void SetResult", "internal void SetResult")} 481.Replace("public void SetResult", "internal void SetResult")} 644{AsyncBuilderCode("B1", "T1").Replace("public class B1", "public class B1")} 645{AsyncBuilderCode("B2", "T2").Replace("public class B2", "internal class B2")} 646{AsyncBuilderCode("B3", "T3").Replace("public class B3", "public class B3").Replace("public T3 Task =>", "internal T3 Task =>")} 647{AsyncBuilderCode("B4", "T4").Replace("public class B4", "internal class B4")} 979{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public MyTask Task", "public object Task")} 980{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public MyTask<T> Task", "public object Task")} 1021.Replace("public static MyTaskMethodBuilder Create() => new MyTaskMethodBuilder(new MyTask());", "")} 1024.Replace("public static MyTaskMethodBuilder<T> Create() => new MyTaskMethodBuilder<T>(new MyTask<T>());", "")} 1066{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public static MyTaskMethodBuilder Create()", accessibility + " static MyTaskMethodBuilder Create()")} 1067{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public static MyTaskMethodBuilder<T> Create()", accessibility + " static MyTaskMethodBuilder<T> Create()")} 1106{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public static MyTaskMethodBuilder Create()", "public MyTaskMethodBuilder Create()")} 1107{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public static MyTaskMethodBuilder<T> Create()", "public MyTaskMethodBuilder<T> Create()")} 1147{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public static MyTaskMethodBuilder Create()", "public static MyTaskMethodBuilder Create(int i)")} 1148{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public static MyTaskMethodBuilder<T> Create()", "public static MyTaskMethodBuilder<T> Create(int i)")} 1188{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public static MyTaskMethodBuilder Create()", "public static MyTaskMethodBuilder Create<U>()")} 1189{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public static MyTaskMethodBuilder<T> Create()", "public static MyTaskMethodBuilder<T> Create<U>()")} 1230.Replace( 1235.Replace( 1281{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public class MyTaskMethodBuilder", "internal class MyTaskMethodBuilder")} 1282{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public class MyTaskMethodBuilder<T>", "internal class MyTaskMethodBuilder<T>")} 1310{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public class MyTaskMethodBuilder", "private class MyTaskMethodBuilder")} 1311{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public class MyTaskMethodBuilder<T>", "private class MyTaskMethodBuilder<T>")} 1345{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public static MyTaskMethodBuilder Create()", "internal static MyTaskMethodBuilder Create()")} 1346{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public static MyTaskMethodBuilder<T> Create()", "internal static MyTaskMethodBuilder<T> Create()")} 1534{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public MyTask Task =>", "internal MyTask Task =>")} 1535{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public MyTask<T> Task =>", "internal MyTask<T> Task =>")} 1574{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public MyTask Task => _task;", "public static MyTask Task => throw null;")} 1575{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public MyTask<T> Task => _task;", "public static MyTask<T> Task => throw null;")} 1614{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public MyTask Task => _task;", "public static MyTask Task = null;")} 1615{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public MyTask<T> Task => _task;", "public MyTask<T> Task = null;")} 1654{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public void SetException", "internal void SetException")} 1655{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public void SetException", "internal void SetException")} 1695.Replace("public void SetException(System.Exception e) { }", "public object SetException(System.Exception e) => null;")} 1698.Replace("public void SetException(System.Exception e) { }", "public object SetException(System.Exception e) => null;")} 1738{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public void SetException(System.Exception e)", "public void SetException()")} 1739{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public void SetException(System.Exception e)", "public void SetException()")} 1778{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public void SetResult", "internal void SetResult")} 1779{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public void SetResult", "internal void SetResult")} 1818{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public void AwaitOnCompleted", "internal void AwaitOnCompleted")} 1819{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public void AwaitOnCompleted", "internal void AwaitOnCompleted")} 1858{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public void AwaitUnsafeOnCompleted", "internal void AwaitUnsafeOnCompleted")} 1859{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public void AwaitUnsafeOnCompleted", "internal void AwaitUnsafeOnCompleted")} 1898{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public void Start", "internal void Start")} 1899{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public void Start", "internal void Start")} 1938{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask").Replace("public void SetStateMachine", "internal void SetStateMachine")} 1939{AsyncBuilderCode("MyTaskMethodBuilder", "MyTask", "T").Replace("public void SetStateMachine", "internal void SetStateMachine")} 2088{AsyncBuilderCode("MyTaskTypeBuilder", "MyTaskType").Replace("public class MyTaskType", "internal class MyTaskType")}
CodeGen\CodeGenAsyncTests.cs (14)
3771{AsyncBuilderCode("B0", "T0").Replace("public static B0 Create()", "public static B0 Create()")} 3772{AsyncBuilderCode("B1", "T1").Replace("public static B1 Create()", "private static B1 Create()")} 3773{AsyncBuilderCode("B2", "T2").Replace("public static B2 Create() => default(B2);", "public static void Create() { }")} 3774{AsyncBuilderCode("B3", "T3").Replace("public static B3 Create() => default(B3);", "public static B1 Create() => default(B1);")} 3775{AsyncBuilderCode("B4", "T4").Replace("public static B4 Create()", "public static B4 Create(int i)")} 3776{AsyncBuilderCode("B5", "T5").Replace("public static B5 Create()", "public static B5 Create<T>()")} 3777{AsyncBuilderCode("B6", "T6").Replace("public static B6 Create()", "public static B6 Create(object arg = null)")} 3778{AsyncBuilderCode("B7", "T7").Replace("public static B7 Create()", "public static B7 Create(params object[] arg)")} 3779{AsyncBuilderCode("B8", "T8").Replace("public static B8 Create()", "public B8 Create()")} 3852{AsyncBuilderCode("B1", "T1").Replace("public class B1", "public class B1")} 3853{AsyncBuilderCode("B2", "T2").Replace("public class B2", "internal class B2")} 3854{AsyncBuilderCode("B3", "T3").Replace("public class B3", "public class B3").Replace("public T3 Task { get; }", "internal T3 Task {get; }")} 3855{AsyncBuilderCode("B4", "T4").Replace("public class B4", "internal class B4")}
CodeGen\CodeGenAwaitForeachTests.cs (2)
176var comp_checked = CreateCompilationWithTasksExtensions(new[] { source.Replace("REPLACE", "checked"), s_IAsyncEnumerable }, options: TestOptions.DebugExe); 180var comp_unchecked = CreateCompilationWithTasksExtensions(new[] { source.Replace("REPLACE", "unchecked"), s_IAsyncEnumerable }, options: TestOptions.DebugExe);
CodeGen\CodeGenDeconstructTests.cs (3)
2401var source = template.Replace("VARIABLES", variables).Replace("TUPLE", tuple).Replace("OUTPUT", output);
CodeGen\CodeGenOverridingAndHiding.cs (8)
11820 => source.Replace("METHOD1", method1).Replace("METHOD2", method2), 1183_ => source.Replace("METHOD2", method1).Replace("METHOD1", method2), 11890 => s.Replace("BASEREF", "ref").Replace("BASE2REF", "out"), 1190_ => s.Replace("BASEREF", "out").Replace("BASE2REF", "ref"),
CodeGen\CodeGenTupleEqualityTests.cs (9)
62.Replace("CHANGE1", change1) 63.Replace("CHANGE2", change2) 64.Replace("EXPECTED", expectedMatch ? "true" : "false"); 2414var comp = CreateCompilation(source.Replace("EXPRESSION", expression), options: TestOptions.DebugExe); 4477var comp = CreateCompilation(source.Replace("REPLACE", expression), 4581var comp = CreateCompilation(source.Replace("REPLACE", expression), 4671var comp = CreateCompilation(source.Replace("REPLACE", expression), options: TestOptions.DebugExe); 4741var comp = CreateCompilation(source.Replace("REPLACE", expression)); 4933var comp = CreateCompilation(source.Replace("REPLACE", expression));
CodeGen\WinMdDelegateTests.cs (1)
148var nonWinRtLibrarySrc = winRtDelegateLibrarySrc.Replace("WinRTDelegateLibrary", "NonWinRTDelegateLibrary");
Emit\CompilationEmitTests.cs (3)
1204string source1 = sourceTemplate.Replace("CHANGE", change1); 1208var source2 = sourceTemplate.Replace("CHANGE", change2); 2093string source = sourceTemplate.Replace("CHANGE", change);
Emit\DeterministicTests.cs (4)
175var mvid1 = CompiledGuid(source.Replace("CHANGE", ""), "X1", TestOptions.DebugDll, emitRefAssembly); 176var mvid2 = CompiledGuid(source.Replace("CHANGE", "private void M() { }"), "X1", TestOptions.DebugDll, emitRefAssembly); 468sourceBuilder.Add(source.Replace("NUMBER1", i.ToString()).Replace("NUMBER2", j.ToString()));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (56)
Emit\EditAndContinue\EditAndContinueClosureTests.cs (9)
3843var source0 = MarkedSource(template.Replace("<<VALUE>>", "0"), options: TestOptions.Regular.WithNoRefSafetyRulesAttribute()); 3844var source1 = MarkedSource(template.Replace("<<VALUE>>", "1"), options: TestOptions.Regular.WithNoRefSafetyRulesAttribute()); 3845var source2 = MarkedSource(template.Replace("<<VALUE>>", "2"), options: TestOptions.Regular.WithNoRefSafetyRulesAttribute()); 3884v0.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "0")); 3896diff1.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "1")); 3908diff2.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "2")); 3923var source0 = MarkedSource(template.Replace("<<CALL>>", "d.F(out x, new { })")); 3924var source1 = MarkedSource(template.Replace("<<CALL>>", "d.F(out x, new { y })")); 3925var source2 = MarkedSource(template.Replace("<<CALL>>", "d.F(new { y }, out x)"));
Emit\EditAndContinue\EditAndContinueStateMachineTests.cs (21)
7735var source0 = MarkedSource(template.Replace("<<VALUE>>", "0")); 7736var source1 = MarkedSource(template.Replace("<<VALUE>>", "1")); 7737var source2 = MarkedSource(template.Replace("<<VALUE>>", "2")); 7888diff1.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "1").Replace("<<DYNAMIC_CONTAINER_NAME>>", "<>o__0#1")); 7901diff2.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "2").Replace("<<DYNAMIC_CONTAINER_NAME>>", "<>o__0#2")); 9215v0.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "1")); 9234diff1.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "2")); 9253diff2.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "3")); 9372v0.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "1")); 9385diff1.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "2")); 9398diff2.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "3")); 9527v0.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "1")); 9538diff1.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "2")); 9549diff2.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "3")); 9569var source0 = MarkedSource(template.Replace("<<VALUE>>", "0")); 9570var source1 = MarkedSource(template.Replace("<<VALUE>>", "1")); 9571var source2 = MarkedSource(template.Replace("<<VALUE>>", "2")); 9696diff1.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "1")); 9708diff2.VerifyIL("C.<F>d__0.System.Collections.IEnumerator.MoveNext()", baselineIL.Replace("<<VALUE>>", "2"));
Emit\EditAndContinue\EditAndContinueTests.cs (20)
10539var source0 = MarkedSource(template.Replace("<<VALUE>>", "0")); 10540var source1 = MarkedSource(template.Replace("<<VALUE>>", "1")); 10541var source2 = MarkedSource(template.Replace("<<VALUE>>", "2")); 10610v0.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "0")); 10624diff1.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "1")); 10638diff2.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "2")); 10662var source0 = MarkedSource(template.Replace("<<VALUE>>", "0")); 10663var source1 = MarkedSource(template.Replace("<<VALUE>>", "1")); 10664var source2 = MarkedSource(template.Replace("<<VALUE>>", "2")); 10733v0.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "0")); 10747diff1.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "1")); 10761diff2.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "2")); 10894var source0 = MarkedSource(template.Replace("<<VALUE>>", "0")); 10895var source1 = MarkedSource(template.Replace("<<VALUE>>", "1")); 10896var source2 = MarkedSource(template.Replace("<<VALUE>>", "2")); 10959diff1.VerifyIL("C.F", baselineIL.Replace("<<VALUE>>", "1")); 10969diff2.VerifyIL("C.F", baselineIL.Replace("<<VALUE>>", "2")); 11571var source0 = MarkedSource(template.Replace("<<VALUE>>", "0")); 11572var source1 = MarkedSource(template.Replace("<<VALUE>>", "1")); 11573var source2 = MarkedSource(template.Replace("<<VALUE>>", "2"));
Emit\NumericIntPtrTests.cs (2)
80static string normalizeDisplayString(string s) => s.Replace("System.IntPtr", "nint").Replace("System.UIntPtr", "nuint");
PDB\PDBAsyncTests.cs (1)
66verify(text.Replace("public static int Count = 0;", "public static int Count;"));
PDB\PDBConstantTests.cs (3)
685<constant name=""x"" value=""" + str.Replace("\0", @"\u0000") + @""" type=""String"" /> 703<constant name=""x"" value=""" + str.Replace("\0", @"\u0000") + @""" type=""String"" /> 760<constant name=""x"" value=""" + str.Replace("\0", @"\u0000") + @""" type=""String"" />
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (66)
Attributes\AttributeTests_Dynamic.cs (1)
1441return noCS1980String.Replace("%TYPENAME%", typeName);
Attributes\AttributeTests_WellKnownAttributes.cs (1)
12925verifier.VerifyIL("C.E2.remove", il.Replace(".locals", ".locals init"));
FieldKeywordTests.cs (2)
10478var modifiedTree = SyntaxFactory.ParseSyntaxTree(source.Replace("return null;", "return field;"), parseOptions); 10512var modifiedTree = SyntaxFactory.ParseSyntaxTree(source.Replace("return null;", "return field;"), parseOptions);
FlowAnalysis\RegionAnalysisTests.cs (2)
4522var compilation = CreateCompilation(source.Replace("unsafe", keyword)); 5611verify(source.Replace("static (", "("));
Semantics\CollectionExpressionTests.cs (1)
1853string outputStringType = stringType.Replace("string", "System.String");
Semantics\ExtensionTests.cs (30)
4726""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 4849verifier1.VerifyTypeIL("Extensions", expectedTypeIL.Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 5253""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 5438""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 5809""").Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 6127""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 6288""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 6626""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 6886""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 7297""").Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 7598""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 7766verifier1.VerifyTypeIL("Extensions", expectedTypeIL.Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 8282""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 8465""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 8834""").Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 9116""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 9261verifier1.VerifyTypeIL("Extensions", expectedTypeIL.Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 9547verifier1.VerifyTypeIL("Extensions", expectedTypeIL.Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 9759""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 9930""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 10074""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 10219""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 10363""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 10505""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 10686""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]"). 10687Replace("[System.Core]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[System.Core]")); 10849""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]"). 10850Replace("[System.Core]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[System.Core]")); 11004""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]"). 11005Replace("[System.Core]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[System.Core]"));
Semantics\ParamsCollectionTests.cs (1)
5395string outputStringType = stringType.Replace("string", "System.String");
Semantics\PatternMatchingTests3.cs (7)
4968var source = sourceTemplate.Replace("TESTS", tests.ToString()).Replace("CASES", casesString).Replace("TYPE", type); 5252source = source.Replace("KTYPE", constantType).Replace("TYPE", type); 5321source = source.Replace("KTYPE", constantType).Replace("TYPE", type);
Semantics\PrimaryConstructorTests.cs (19)
7758source += nestedSource.Replace("p1", @" 8086source += attribute.Replace("p1", @" 8175source += attribute.Replace("p1", @" 8258source += attribute.Replace("p1", @" 9120".Replace("[mscorlib]", ExecutionConditionUtil.IsDesktop ? "[mscorlib]" : "[netstandard]")); 9311".Replace("[netstandard]", ExecutionConditionUtil.IsDesktop ? "[mscorlib]" : "[netstandard]")); 16043".Replace("[mscorlib]", ExecutionConditionUtil.IsDesktop ? "[mscorlib]" : "[netstandard]")); 16585".Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 16790".Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 17426".Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 17498".Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 17611".Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 17718".Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 17951".Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 18181".Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 19025".Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 19222".Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 19322".Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 19403".Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]"));
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (2)
17696return op.Replace("&", "&amp;").Replace("<", "&lt;");
Microsoft.CodeAnalysis.CSharp.Features (3)
EmbeddedLanguages\EmbeddedLanguageUtilities.cs (1)
33? text.Replace(@"\", @"\\")
InitializeParameter\CSharpAddParameterCheckCodeRefactoringProvider.cs (2)
57=> input.Replace("\\", "\\\\").Replace("\"", "\\\"");
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (64)
Diagnostics\Suppression\RemoveSuppressionTests.cs (12)
590".Replace("<", "&lt;").Replace(">", "&gt;"); 646".Replace("<", "&lt;").Replace(">", "&gt;"); 710".Replace("<", "&lt;").Replace(">", "&gt;"); 828".Replace("<", "&lt;").Replace(">", "&gt;"); 839".Replace("<", "&lt;").Replace(">", "&gt;"); 964".Replace("<", "&lt;").Replace(">", "&gt;");
Diagnostics\Suppression\SuppressionTest_FixAllTests.cs (12)
517.Replace("<", "&lt;").Replace(">", "&gt;"); 627.Replace("<", "&lt;").Replace(">", "&gt;"); 737".Replace("<", "&lt;").Replace(">", "&gt;"); 751".Replace("<", "&lt;").Replace(">", "&gt;"); 886.Replace("<", "&lt;").Replace(">", "&gt;"); 991.Replace("<", "&lt;").Replace(">", "&gt;");
Diagnostics\Suppression\SuppressionTests.cs (9)
2121expected = expected.Replace("class Class", "[|class Class|]"); 2159expected = expected.Replace("class Class", "[|class Class|]"); 2199expected = expected.Replace("class Class", "[|class Class|]"); 2242expected = expected.Replace("class Class", "[|class Class|]"); 2285expected = expected.Replace("class Class", "[|class Class|]"); 2328expected = expected.Replace("int Method()", "[|int Method()|]"); 2369expected = expected.Replace("public void Method(int unused)", "[|public void Method(int unused)|]"); 2402expected = expected.Replace("public void Method(int unused)", "[|public void Method(int unused)|]"); 2436expected = expected.Replace("public void Method(int unused)", "[|public void Method(int unused)|]");
EditAndContinue\BreakpointSpansTests.cs (8)
4423TestSpan(source.Replace("class", keyword)); 4440TestSpan(source.Replace("class", keyword)); 4461TestSpan(source.Replace("record", keyword)); 4476TestMissing(source.Replace("class", keyword)); 4503TestSpan(source.Replace("class", keyword)); 4518TestSpan(source.Replace("class", keyword)); 4533TestSpan(source.Replace("record", keyword)); 4546TestMissing(source.Replace("class", keyword));
EditAndContinue\StatementEditingTests.cs (2)
11789newStatement ??= oldStatement.Replace("old", "@new"); 11848var newStatement = oldStatement.Replace("old", "@new");
EnableNullable\EnableNullableTests.cs (3)
649var fixedDirective = directive.Replace("$$", "").Replace("restore", "disable"); 756var fixedDirective = directive.Replace("$$", "");
FullyQualify\FullyQualifyTests.cs (2)
107}".Replace(@"\t", "\t"), 114}".Replace(@"\t", "\t"), testHost: testHost);
SimplifyTypeNames\SimplifyTypeNamesTests.cs (2)
1182var newContent = content.Replace(@"[||]", pair.Key); 1183var expected = content.Replace(@"[||]", pair.Value);
src\Analyzers\CSharp\Tests\GenerateDefaultConstructors\GenerateDefaultConstructorsTests.cs (3)
63TestCode = source.Replace("[||]", ""), 89source = source.Replace("[||]", ""); 956TestCode = source.Replace("[||]", ""),
src\Analyzers\CSharp\Tests\UseCompoundAssignment\UseCompoundAssignmentTests.cs (4)
1283var before = expressionContext.Replace("$$", "i [|=|] i + 1"); 1284var after = expressionContext.Replace("$$", "++i"); 1310var before = expressionContext.Replace("$$", "i [|=|] i + 1"); 1311var after = expressionContext.Replace("$$", "++i");
src\Analyzers\CSharp\Tests\UseSystemThreadingLock\UseSystemThreadingLockTests.cs (5)
231""" + SystemThreadingLockTypePolyFill.Replace("public", "internal"), 254""" + SystemThreadingLockTypePolyFill.Replace(" Scope", " Scope1"), 278.Replace("public ref struct", "private ref struct") 279.Replace("public Scope", "private Scope"), 302""" + SystemThreadingLockTypePolyFill.Replace("public ref struct", "public struct"),
UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzerTests.cs (1)
89return initialMarkup.Replace("EXPRESSION", expression);
UseRecursivePatterns\UseRecursivePatternsRefactoringTests.cs (1)
256return entry is null ? markup : markup.Replace(entry, "[||]" + entry);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
InteractiveSessionTests.cs (1)
1575Diagnostic(ErrorCode.ERR_BadAccess, "Z").WithArguments(typeof(PrivateClass).FullName.Replace("+", ".") + ".Z()"));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (71)
Semantics\AnonymousFunctionTests.cs (3)
34verify(source.Replace("static (", "(")); 1183verify(source.Replace("static (", "(")); 1608verify(source.Replace("static (", "("));
Semantics\BindingAsyncTasklikeTests.cs (5)
180source = source.Replace("<<arg>>", arg); 181source = source.Replace("<<betterOverload>>", (betterOverload != null) ? "static string " + betterOverload + " => \"better\";" : ""); 182source = source.Replace("<<worseOverload>>", (worseOverload != null) ? "static string " + worseOverload + " => \"worse\";" : ""); 183source = source.Replace("<<implicitConversionToTask>>", implicitConversionToTask ? "public static implicit operator Task(ValueTask t) => Task.FromResult(0);" : ""); 184source = source.Replace("<<implicitConversionToTaskT>>", implicitConversionToTask ? "public static implicit operator Task<T>(ValueTask<T> t) => Task.FromResult<T>(t._result);" : "");
Semantics\DeconstructionTests.cs (2)
1484var source = template.Replace("VARIABLES", variables).Replace("TUPLE", tuple);
Semantics\NativeIntegerTests.cs (2)
665static string normalizeDisplayString(string s) => s.Replace("System.IntPtr", "nint").Replace("System.UIntPtr", "nuint");
Semantics\NullableReferenceTypesTests.cs (20)
3254var comp = CreateCompilation(source.Replace("FIELDTYPE", fieldType), options: WithNullableEnable()); 42348var comp = CreateNullableCompilation(new[] { MaybeNullWhenAttributeDefinition, source.Replace("TYPE", type) }); 42405var comp = CreateNullableCompilation(new[] { AllowNullAttributeDefinition, MaybeNullAttributeDefinition, MaybeNullWhenAttributeDefinition, source.Replace("TYPE", type) }); 42448var comp = CreateNullableCompilation(new[] { AllowNullAttributeDefinition, MaybeNullAttributeDefinition, MaybeNullWhenAttributeDefinition, source.Replace("TYPE", type) }); 42575var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition, NotNullWhenAttributeDefinition, source.Replace("TYPE", type) }); 42661var comp = CreateNullableCompilation(new[] { NotNullAttributeDefinition, NotNullWhenAttributeDefinition, source.Replace("CONSTRAINT", constraint) }); 42840var comp = CreateNullableCompilation(new[] { MaybeNullWhenAttributeDefinition, NotNullAttributeDefinition, NotNullWhenAttributeDefinition, source.Replace("TYPE", type) }); 76775var comp = CreateCompilation(source.Replace("OPERATOR", op), options: WithNullableEnable()); 113176var comp1 = CreateCompilation(new[] { source.Replace("PLACEHOLDER", "") }); 113179var comp2 = CreateCompilation(new[] { source.Replace("PLACEHOLDER", "annotations") }); 113219var source1 = source0.Replace("PLACEHOLDER", ""); 113220var source2 = source0.Replace("PLACEHOLDER", "annotations"); 113255verify(source.Replace("PLACEHOLDER", "")); 113256verify(source.Replace("PLACEHOLDER", "annotations")); 113285var source1 = source0.Replace("PLACEHOLDER", ""); 113286var source2 = source0.Replace("PLACEHOLDER", "annotations"); 113323verify(source.Replace("PLACEHOLDER", "")); 113324verify(source.Replace("PLACEHOLDER", "annotations")); 113357var source1 = source0.Replace("PLACEHOLDER", ""); 113358var source2 = source0.Replace("PLACEHOLDER", "annotations");
Semantics\NullableTests.cs (16)
267CompileAndVerify(source: source4.Replace("TYPE", type), expectedOutput: "0", verify: Verification.FailsPEVerify); 268CompileAndVerify(source: source4.Replace("TYPE", type), expectedOutput: "0", parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 325var verifier = CompileAndVerify(source: source.Replace("TYPE", type), expectedOutput: expected); 751string s = source.Replace("TYPE", t).Replace("OP", oper).Replace("ZERO", zeros[t]).Replace("ONE", ones[t]); 1293.Replace("METHOD", "M" + m) 1294.Replace("TYPEX", typeX) 1295.Replace("TYPEY", typeY) 1296.Replace("OP", oper) 1297.Replace("NAME", names[oper]) 1298.Replace("TWOX", twos[typeX]) 1299.Replace("ONEX", ones[typeX]) 1300.Replace("TWOY", twos[typeY]) 1301.Replace("ONEY", ones[typeY]));
Semantics\OperatorTests.cs (2)
3305string result = template.Replace("OPERATOR", op); 3306result = result.Replace("KIND", opkind);
Semantics\SemanticErrorTests.cs (1)
1820DiagnosticsUtils.VerifyErrorsAndGetCompilationWithMscorlib(template.Replace("System.Int32", t.ToString()),
Semantics\TargetTypedDefaultTests.cs (11)
1720var source = template.Replace("MODIFIER", modifier).Replace("TYPE", type).Replace("VALUE", value).Replace("EQUAL", equal); 1786var source = template.Replace("MODIFIER", modifier).Replace("TYPE", type).Replace("VALUE", value).Replace("EQUAL", equal); 1857var source = template.Replace("TYPE", type).Replace("VALUE", value).Replace("EQUAL", equal);
Semantics\TopLevelStatementsTests.cs (2)
7659return toEscape.Replace("<", "&lt;").Replace(">", "&gt;");
Semantics\UserDefinedConversionTests.cs (5)
121string source1 = _userDefinedConversionTestTemplate.Replace("XXX", "implicit"); 297string implicitConversions = _userDefinedConversionTestTemplate.Replace("XXX", "implicit"); 325string explicitConversions = _userDefinedConversionTestTemplate.Replace("XXX", "explicit"); 548string source1 = _userDefinedConversionTestTemplate.Replace("XXX", "implicit"); 550string source2 = _userDefinedConversionTestTemplate.Replace("XXX", "explicit");
SourceGeneration\GeneratorDriverTests.cs (2)
1256source = source.Replace(Environment.NewLine, "\r\n"); 1347source = source.Replace(Environment.NewLine, "\r\n");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (21)
Compilation\UsedAssembliesTests.cs (1)
176builder.Append(directive.ToFullString().Replace("using", "global using"));
Symbols\AnonymousTypesSemanticsTests.cs (2)
2122source = source.Replace(startTag, " ").Replace(endTag, " ");
Symbols\MockSymbolTests.cs (3)
254}".Replace("Assembly: Merged", "Assembly: Merged, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null") 255.Replace("Assembly: Assem1", "Assembly: Assem1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null") 256.Replace("Assembly: Assem3", "Assembly: Assem3, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null");
Symbols\PartialPropertiesTests.cs (2)
5481""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 5532""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]"));
Symbols\RequiredMembersTests.cs (1)
375code = code.Replace("required", "@required");
Symbols\Source\EventTests.cs (2)
2628".Replace("[netstandard]", ExecutionConditionUtil.IsDesktop ? "[mscorlib]" : "[netstandard]")); 2766".Replace("[netstandard]", ExecutionConditionUtil.IsDesktop ? "[mscorlib]" : "[netstandard]"));
Symbols\StaticAbstractMembersInInterfacesTests.cs (1)
34330return source2.Replace("T", "C1");
Symbols\UnsignedRightShiftTests.cs (9)
119verifier.VerifyIL("C.Test1", actualIL.Replace("shr.un", "shr").Replace("shr", "shr.un")); 1172verifier.VerifyIL("C.Test1", actualIL.Replace("shr.un", "shr").Replace("shr", "shr.un")); 1979verifier.VerifyIL("C.Test1", actualIL.Replace("op_RightShift", "op_UnsignedRightShift")); 2231verifier.VerifyIL("C.Test1", actualIL.Replace("op_RightShift", "op_UnsignedRightShift")); 2373verifier.VerifyIL("C.Test1", actualIL.Replace("op_RightShift", "op_UnsignedRightShift")); 2507verifier.VerifyIL("C.Test1", actualIL.Replace("op_RightShift", "op_UnsignedRightShift")); 2604verifier.VerifyIL("C.Test1", actualIL.Replace("op_RightShift", "op_UnsignedRightShift"));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (14)
Parsing\ParsingTests.cs (2)
397var value = node.ToString().Replace("\"", "\\\""); 413, "{trivia.ToString().Replace("\"", "\\\"").ReplaceLineEndings("\\n")}"
Parsing\RawInterpolatedStringLiteralCompilingTests.cs (5)
21markup = markup.Replace("\r\n", "\n"); 22markup = markup.Replace("\r", "\n"); 23markup = markup.Replace("\n", normalizedNewLine); 766}".Replace("\r\n", "\n"), expectedOutput: "abc\"\ndef"); 786}".Replace("\r\n", "\n"), expectedOutput: " abc\"\n def");
Parsing\RawStringLiteralCompilingTests.cs (2)
452}".Replace("\r\n", "\n"), expectedOutput: "abc\"\ndef"); 472}".Replace("\r\n", "\n"), expectedOutput: " abc\"\n def");
Syntax\SyntaxEquivalenceTests.cs (3)
412var tree2 = SyntaxFactory.ParseSyntaxTree(text.Replace(" ", " /**/ ")); 423var tree2 = SyntaxFactory.ParseSyntaxTree(text.Replace(" ", " ")); 434var tree2 = SyntaxFactory.ParseSyntaxTree(text.Replace("abc", "hello"));
Syntax\SyntaxNodeTests.cs (2)
4025{inputText.Replace("\r", ""), expectedText.Replace("\r", "")}, // Test LF (Unix)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
487=> triviaList.Sum(t => t.ToFullString().Replace("\r\n", "\r").Cast<char>().Count(c => SyntaxFacts.IsNewLine(c)));
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Formatting\FormattingTests.cs (1)
10989""".Replace("&nbsp;", "\u00A0"));
Microsoft.CodeAnalysis.EditorFeatures (3)
EditorConfigSettings\Updater\SettingsUpdateHelper.cs (3)
258fileName = fileName.Replace(".", @"\."); 259fileName = fileName.Replace("*", ".*"); 260fileName = fileName.Replace("/", @"\/");
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (5)
AbstractTypingCommandHandlerTest.cs (1)
59private static string ReplaceTabTags(string markup) => markup.Replace("<tab>", "\t");
BraceHighlighting\AbstractBraceHighlightingTests.cs (2)
33text = text.Replace("<", "[").Replace(">", "]");
QuickInfo\ToolTipAssert.cs (2)
175result.Append($"{classification}, \"{classifiedTextRun.Text.Replace("\"", "\"\"")}\""); 178var tooltip = classifiedTextRun.Tooltip is object ? $"\"{classifiedTextRun.Tooltip.Replace("\"", "\"\"")}\"" : "Nothing";
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
CodeFixes\CodeFixServiceTests.cs (1)
1051code = code.Replace(priorSnapshotFixLine, "int x2 = 0;");
CodeGeneration\CodeGenerationTests.cs (6)
148expected = expected.Replace("$$", statements); 192expected = expected.Replace("$$", statements); 278expected = expected.Replace("$$", statements); 310expected = expected.Replace("$$", statements); 429expected = expected.Replace("$$", getStatements); 434expected = expected.Replace("$$", setStatements);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
IntelliSense\CSharpCompletionCommandHandlerTests_AwaitCompletion.vb (2)
800committedAwait = committedAwait.Replace("$$", "") 827committedAwaitf = committedAwaitf.Replace("$$", "")
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
ResultProviderTestBase.cs (1)
473return str.Replace("\"", "\\\"");
Microsoft.CodeAnalysis.Features (17)
CodeFixes\Configuration\ConfigurationUpdater.cs (3)
582fileName = fileName.Replace(".", @"\."); 583fileName = fileName.Replace("*", ".*"); 584fileName = fileName.Replace("/", @"\/");
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (1)
85result.Add(CreateCodeAction(prefix + number.Replace(DigitSeparator, string.Empty), FeaturesResources.Remove_separators));
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (4)
156var textWithEscapedBraces = text.Replace("{", "{{").Replace("}", "}}"); 157var valueTextWithEscapedBraces = value.Replace("{", "{{").Replace("}", "}}");
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringRefactoringProvider.cs (2)
97GetTextWithoutQuotes(text.Replace("{", "{{").Replace("}", "}}"), isVerbatim),
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (1)
112static string NormalizeLineEndings(string input) => input.Replace("\n", "\r\n");
MetadataAsSource\AbstractMetadataAsSourceService.AbstractMetadataFormattingRule.cs (1)
58count += trivia.ToFullString().Replace("\r\n", "\r").ToCharArray().Count(IsNewLine);
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (2)
86var reformattedCopyrightTextParts = expectedFileHeader.Replace("\r\n", "\n").Split('\n'); 87var fileHeaderCopyrightTextParts = copyrightText.Replace("\r\n", "\n").Split('\n');
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (2)
77var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(document.FilePath)); 208copyrightText = copyrightText.Replace("\r\n", "\n");
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (1)
139source = source.Replace("_", "__");
Microsoft.CodeAnalysis.Features.Test.Utilities (7)
EditAndContinue\EditAndContinueTestVerifier.cs (5)
507var code = text.GetSubText(text.Lines.GetTextSpan(span.Span)).ToString().Replace("\r\n", " "); 541Old = partners.Key.ToString().Replace("\r\n", " ").Replace("\n", " "), 542New = partners.Value.ToString().Replace("\r\n", " ").Replace("\n", " ")
EditAndContinue\MatchingPair.cs (2)
19=> "{ \"" + Old.Replace("\"", "\\\"") + "\", \"" + New.Replace("\"", "\\\"") + "\" }";
Microsoft.CodeAnalysis.Features.UnitTests (2)
FindUsages\DefinitionItemFactoryTests.cs (2)
39=> (str == null) ? "null" : $"\"{str.Replace(@"\", @"\\").Replace("\"", "\\\"")}\"";
Microsoft.CodeAnalysis.LanguageServer (3)
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (2)
140var projectGuid = projectToLoad.ProjectGuid.Replace("{", string.Empty).Replace("}", string.Empty);
Testing\TestRunner.TestRunHandler.cs (1)
193return text.Replace(Environment.NewLine, $"{Environment.NewLine}{indentation}").TrimEnd().Insert(0, indentation);
Microsoft.CodeAnalysis.LanguageServer.Protocol (6)
Extensions\ProtocolConversions.cs (6)
273=> Uri.EscapeUriString(stringToEscape).Replace("#", "%23"); 644var glyphString = glyph.ToString().Replace(nameof(Accessibility.Public), string.Empty) 645.Replace(nameof(Accessibility.Protected), string.Empty) 646.Replace(nameof(Accessibility.Private), string.Empty) 647.Replace(nameof(Accessibility.Internal), string.Empty); 993text = text.Replace(" ", "&nbsp;");
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (4)
Hover\HoverTests.cs (3)
568&nbsp;&nbsp;&nbsp;&nbsp;{string.Format(FeaturesResources._0_1, "Net472", FeaturesResources.Available).Replace("-", "\\-")} 569&nbsp;&nbsp;&nbsp;&nbsp;{string.Format(FeaturesResources._0_1, "NetCoreApp3", FeaturesResources.Not_Available).Replace("-", "\\-")} 571{FeaturesResources.You_can_use_the_navigation_bar_to_switch_contexts.Replace(".", "\\.")}
UriTests.cs (1)
143var gitDocumentUri = new DocumentUri(fileDocumentUri.ToString().Replace("file", "git"));
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (2)
ResxGeneratorTests.cs (2)
761var id = string.Join("_", noWarn.Replace(" ", "").Split(",", System.StringSplitOptions.TrimEntries | System.StringSplitOptions.RemoveEmptyEntries)); 795var id = string.Join("_", noWarn.Replace(" ", "").Split(",", System.StringSplitOptions.TrimEntries | System.StringSplitOptions.RemoveEmptyEntries));
Microsoft.CodeAnalysis.Test.Utilities (26)
Assert\AssertEx.cs (4)
306messageBuilder.AppendLine(line.Text.Replace("\r", "<CR>").Replace("\n", "<LF>")); 648Func<T, string> itemInspector = escapeQuotes ? new Func<T, string>(t => t.ToString().Replace("\"", "\"\"")) : null; 906itemInspector: escapeQuotes ? new Func<string, string>(line => line.Replace("\"", "\"\"")) : null,
Assert\AssertXml.cs (4)
98string actualString = expectedIsXmlLiteral ? actual.Replace(" />\r\n", "/>\r\n") : string.Format("@\"{0}\"", actual.Replace("\"", "\"\"")); 99string expectedString = expectedIsXmlLiteral ? expected.Replace(" />\r\n", "/>\r\n") : string.Format("@\"{0}\"", expected.Replace("\"", "\"\""));
CommonTestBase.cs (1)
500=> source.Replace(Environment.NewLine, "\r\n");
Compilation\OperationTreeVerifier.cs (8)
67actual = actual.Replace(" \n", "\n").Replace(" \r", "\r"); 69expectedOperationTree = expectedOperationTree.Replace("\r\n", "\n").Replace(" \n", "\n").Replace("\n", Environment.NewLine); 233s = s.Replace("\"", "\"\""); 236return formattable.ToString(null, CultureInfo.InvariantCulture).Replace("\"", "\"\""); 238return constant.ToString().Replace("\"", "\"\"");
CompilationVerifier.cs (1)
291return s_codeSizeCommentsRegex.Replace(output, match => match.Groups[0].Value.Replace(match.Groups[1].Value, ""));
Diagnostics\DiagnosticDescription.cs (2)
371argumentString = argumentString.Replace("\"", "\"\""); 400sb.Append(_squiggledText.Replace("\"", "\"\""));
FX\StringExtensions.cs (1)
15input = input.Replace("\n", "\r\n");
Metadata\IlasmUtilities.cs (1)
106completeIL = declarations.Replace("<<GeneratedFileName>>", sourceFileName);
Metadata\MetadataSignatureUnitTestHelper.cs (3)
88expectedSignature = expectedSignature.Replace("\"", "\\\""); 97var actualSignature = signature.Replace("\"", "\\\""); 119var actualSignature = signatures.First().Replace("\"", "\\\"");
TestHelpers.cs (1)
150return data.Value.Replace("\n", "\r\n");
Microsoft.CodeAnalysis.UnitTests (1)
Collections\DebuggerAttributes.cs (1)
169reference = reference.Replace(",nq", string.Empty);
Microsoft.CodeAnalysis.VisualBasic (2)
CommandLine\VisualBasicCommandLineParser.vb (1)
1856symbolList = symbolList.Replace("\""", """")
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
515Return """"c & str.Replace("""", """""") & """"c
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Analyzers\VisualBasic\CodeFixes\SimplifyInterpolation\VisualBasicSimplifyInterpolationCodeFixProvider.vb (1)
38Return formatString.Replace("""", """""")
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (1)
src\Analyzers\VisualBasic\Tests\ImplementInterface\ImplementInterfaceTests.vb (1)
4321code = code.Replace("System.IDisposable.Dispose", "IDisposable.Dispose")
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (15)
CommandLineBreakingChanges.vb (5)
39</text>.Value.Trim().Replace(vbLf, vbCrLf), tempLog.ReadAllText().Trim().Replace(src, "SRC.VB")) 75</text>.Value.Trim().Replace(vbLf, vbCrLf), tempOut.ReadAllText().Trim().Replace(src, "SRC.VB")) 107</text>.Value.Trim().Replace(vbLf, vbCrLf), tempOut.ReadAllText().Trim().Replace(src, "SRC.VB")) 139</text>.Value.Trim().Replace(vbLf, vbCrLf), tempOut.ReadAllText().Trim().Replace(src, "SRC.VB")) 174</text>.Value.Trim().Replace(vbLf, vbCrLf), tempOut.ReadAllText().Trim().Replace(src, "SRC.VB"))
CommandLineTests.vb (10)
621</text>.Value.Trim().Replace(vbLf, vbCrLf), tempOut.ReadAllText().Trim().Replace(src, "SRC.VB")) 640</text>.Value.Trim().Replace(vbLf, vbCrLf), tempOut.ReadAllText().Trim().Replace(src, "SRC.VB")) 5240</text>, output.Replace(dir.Path, "{SDKPATH}")) 5250</text>, output.Replace(dir.Path, "{SDKPATH}")) 5259</text>, output.Replace(dir.Path, "{SDKPATH}")) 5267AssertOutput(<text></text>, output.Replace(dir.Path, "{SDKPATH}")) ' SUCCESSFUL BUILD with 'mscorlib.dll' and embedded VbCore 5273AssertOutput(<text></text>, output.Replace(dir.Path, "{SDKPATH}")) 5305AssertOutput(<text>vbc : error BC2017: could not find library 'mscorlib.dll'</text>, output.Replace(dir.Path, "{SDKPATH}")) 5313AssertOutput(<text></text>, output.Replace(dir.Path, "{SDKPATH}")) 5320</text>, output.Replace(dir.Path, "{SDKPATH}"))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (29)
Emit\CompilationEmitTests.vb (3)
1060Dim source1 As String = sourceTemplate.Replace("CHANGE", change1) 1065Dim source2 = sourceTemplate.Replace("CHANGE", change2) 1429Dim source As String = sourceTemplate.Replace("CHANGE", change)
Emit\EditAndContinue\EditAndContinueClosureTests.vb (12)
2090Dim source0 = MarkedSource(template.Replace("<<VALUE>>", "0")) 2091Dim source1 = MarkedSource(template.Replace("<<VALUE>>", "1")) 2092Dim source2 = MarkedSource(template.Replace("<<VALUE>>", "2")) 2130v0.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "0")) 2141diff1.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "1")) 2152diff2.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "2")) 2168Dim source0 = MarkedSource(template.Replace("<<VALUE>>", "0")) 2169Dim source1 = MarkedSource(template.Replace("<<VALUE>>", "1")) 2170Dim source2 = MarkedSource(template.Replace("<<VALUE>>", "2")) 2208v0.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "0")) 2219diff1.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "1")) 2230diff2.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "2"))
Emit\EditAndContinue\EditAndContinueStateMachineTests.vb (6)
8561v0.VerifyIL("C.VB$StateMachine_1_F.MoveNext()", baselineIL.Replace("<<VALUE>>", "1")) 8572diff1.VerifyIL("C.VB$StateMachine_1_F.MoveNext()", baselineIL.Replace("<<VALUE>>", "2")) 8583diff2.VerifyIL("C.VB$StateMachine_1_F.MoveNext()", baselineIL.Replace("<<VALUE>>", "3")) 8702v0.VerifyIL("C.VB$StateMachine_1_F.MoveNext()", baselineIL.Replace("<<VALUE>>", "1")) 8713diff1.VerifyIL("C.VB$StateMachine_1_F.MoveNext()", baselineIL.Replace("<<VALUE>>", "2")) 8724diff2.VerifyIL("C.VB$StateMachine_1_F.MoveNext()", baselineIL.Replace("<<VALUE>>", "3"))
Emit\EditAndContinue\EditAndContinueTests.vb (7)
5506Dim source0 = MarkedSource(template.Replace("<<VALUE>>", "0")) 5507Dim source1 = MarkedSource(template.Replace("<<VALUE>>", "1")) 5508Dim source2 = MarkedSource(template.Replace("<<VALUE>>", "2")) 5577v0.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "0")) 5588diff1.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "1")) 5599diff2.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "2")) 6701Dim tree1 = VisualBasicSyntaxTree.ParseText(source0.Replace("' Body", "N1(): N2()"), parseOptions)
XmlLiteralTests.vb (1)
3564str = str.Replace("&#x20;", space)
Microsoft.CodeAnalysis.VisualBasic.Features (2)
InitializeParameter\VisualBasicAddParameterCheckCodeRefactoringProvider.vb (1)
51Return input.Replace("""", """""")
src\Analyzers\VisualBasic\CodeFixes\SimplifyInterpolation\VisualBasicSimplifyInterpolationCodeFixProvider.vb (1)
38Return formatString.Replace("""", """""")
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (13)
Diagnostics\Suppression\SuppressionTests.vb (7)
1796Dim fixedSource = expected.Replace("Class C", "[|Class C|]") 1831Dim fixedSource = expected.Replace("Class C", "[|Class C|]") 1870Dim fixedSource = expected.Replace("Class C", "[|Class C|]") 1911Dim fixedSource = expected.Replace("Class C", "[|Class C|]") 1945Dim fixedSource = expected.Replace("Class C", "[|Class C|]") 1979Dim fixedSource = expected.Replace("Class C", "[|Class C|]") 2013Dim fixedSource = expected.Replace("Sub Method()", "[|Sub Method()|]")
EditAndContinue\StatementEditingTests.vb (2)
5640newStatement = If(newStatement, oldStatement.Replace("old", "[new]")) 5671Dim newStatement = oldStatement.Replace("old", "[new]")
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (4)
62Replace(s_startTag, New String(" "c, s_startTag.Length)). 63Replace(s_endTag, New String(" "c, s_endTag.Length)). 64Replace(s_startSpanMark, New String(" "c, s_startSpanMark.Length)). 65Replace(s_endSpanMark, New String(" "c, s_startSpanMark.Length)).
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Semantics\RequiredMembersTests.vb (1)
537Dim codeWithoutRequired = codeWithRequired.Replace("required ", "")
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (38)
DocumentationComments\DocCommentTests.vb (1)
11922Return If(str Is Nothing, obj, str.Replace(what, [with]))
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (2)
2021text.<file>.Value = text.<file>.Value.Replace(startMarker, " ").Replace(endMarker, " ")
SymbolsTests\GenericConstraintTests.vb (7)
537compilationVerifier.VerifyIL("B1(Of T).F1(Of U)(U)", expectedIL.Replace("F1", "F1")) 538compilationVerifier.VerifyIL("B1(Of T).F2(Of U)(U)", expectedIL.Replace("F1", "F2")) 539compilationVerifier.VerifyIL("B1(Of T).F3(Of U)(U)", expectedIL.Replace("F1", "F3")) 540compilationVerifier.VerifyIL("B2(Of T).F1(Of U)(U)", expectedIL.Replace("F1", "F1")) 541compilationVerifier.VerifyIL("B2(Of T).F2(Of U)(U)", expectedIL.Replace("F1", "F2")) 542compilationVerifier.VerifyIL("B2(Of T).F3(Of U)(U)", expectedIL.Replace("F1", "F3")) 543compilationVerifier.VerifyIL("B2(Of T).F4(Of U)(U)", expectedIL.Replace("F1", "F4"))
SymbolsTests\Metadata\PE\LoadingOperators.vb (12)
601Replace("Boolean", "System.Boolean"). 602Replace("Integer", "System.Int32"). 603Replace("Byte", "System.Byte"), method.ToTestDisplayString()) 1197Replace("Boolean", "System.Boolean"). 1198Replace("Integer", "System.Int32"). 1199Replace("Byte", "System.Byte"), method.ToTestDisplayString()) 1959Replace("Boolean", "System.Boolean"). 1960Replace("Integer", "System.Int32"). 1961Replace("Byte", "System.Byte"), method.ToTestDisplayString()) 2093Replace("Boolean", "System.Boolean"). 2094Replace("Integer", "System.Int32"). 2095Replace("Byte", "System.Byte"), method.ToTestDisplayString())
SymbolsTests\MockSymbolTests.vb (3)
208Replace("Assembly: Merged", "Assembly: Merged, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"). 209Replace("Assembly: Assem1", "Assembly: Assem1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"). 210Replace("Assembly: Assem3", "Assembly: Assem3, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")
SymbolsTests\MyBaseMyClassSemanticsTests.vb (2)
170text.<file>.Value = text.<file>.Value.Replace(startMarker, " ").Replace(endMarker, " ")
SymbolsTests\Source\OperatorsTests.vb (3)
198Replace("Boolean", "System.Boolean"). 199Replace("Integer", "System.Int32"). 200Replace("Byte", "System.Byte"), op.ToTestDisplayString())
SymbolsTests\Source\TypeTests.vb (6)
3327Using reference = IlasmUtilities.CreateTempAssembly(modSource.Replace("<<ModuleName>>", "module1_FT1").Replace("<<TypesForWardedToAssembly>>", "ForwardedTypes1"), 3334Using reference = IlasmUtilities.CreateTempAssembly(modSource.Replace("<<ModuleName>>", "module2_FT1").Replace("<<TypesForWardedToAssembly>>", "ForwardedTypes1"), 3341Using reference = IlasmUtilities.CreateTempAssembly(modSource.Replace("<<ModuleName>>", "module3_FT2").Replace("<<TypesForWardedToAssembly>>", "ForwardedTypes2"),
SymbolsTests\WithStatementSymbolsTests.vb (2)
323text.<file>.Value = text.<file>.Value.Replace(startMarker, " ").Replace(endMarker, " ")
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (37)
Syntax\SyntaxEquivalenceTests.vb (37)
254Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace(" ", " ")) 263Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("Modle ", "Mode ")) 399Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("Body(1)", "Body(2)")) 408Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("Friend", "")) 417Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("args", "arg")) 426Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("args", "<A>args")) 435Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("args", "ByRef args")) 444Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("123", "456")) 453Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("Function", "Sub")) 462Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("As Integer", "")) 471Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("As C", "As D")) 480Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("As <A(1)>C", "As <A(2)>C")) 489Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("E.Goo", "E.Bar")) 498Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("I.Goo", "I.Bar")) 507Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("End Sub", "")) 516Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("End Sub", "End Function")) 543Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("Body(1)", "Body(2)")) 552Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("MyBase", "Me")) 561Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("123", "456")) 572Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("Return 0", "Return 1")) 581Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("b As C", "c As C")) 592Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("<A(1)>", "<A(2)>")) 601Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("<A(1)>", "<A(2)>")) 610Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("<A(1)>", "<A(2)>")) 619Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("123", "345")) 628Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("123", "345")) 637Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("123", "345")) 648Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("<A(1)>", "<A(2)>")) 657Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("<A(1)>", "<A(2)>")) 666Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("<A(1)>", "<A(2)>")) 675Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("<A(1)>", "<A(2)>")) 684Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("<A(1)>", "<A(2)>")) 695Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("Ansi", "Unicode")) 704Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("goo", "goo2")) 713Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("bar", "bar2")) 722Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("Integer", "Boolean")) 731Dim tree2 = VisualBasicSyntaxTree.ParseText(text.Replace("()", "(a As Integer)"))
Microsoft.CodeAnalysis.Workspaces (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
160relativePath = relativePath.Replace("\\", "/");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
505_startToken.ToString().Replace("\r\n", "\\r\\n"), 506_endToken.ToString().Replace("\r\n", "\\r\\n"));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (4)
18=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 21=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
241_stringBuilder.Append(value.Replace("\"", "\"\""));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
129comment = string.Concat(commentStarter, "\r\n", commentStarter, xml!.Replace("\n", newLineStarter));
Storage\SQLite\v2\Interop\SqlConnection.cs (1)
137? $"attach database '{new Uri(databasePath.Replace("'", "''")).AbsoluteUri}?mode=memory&cache=shared' as {Database.WriteCache.GetName()};"
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (5)
VisualStudioMSBuildWorkspaceTests.cs (5)
2769("Encoding.csproj", Resources.ProjectFiles.CSharp.Encoding.Replace("<CodePage>ReplaceMe</CodePage>", "<CodePage>-1</CodePage>")), 2788("Encoding.csproj", Resources.ProjectFiles.CSharp.Encoding.Replace("<CodePage>ReplaceMe</CodePage>", "<CodePage>Broken</CodePage>")), 2807("Encoding.csproj", Resources.ProjectFiles.CSharp.Encoding.Replace("<CodePage>ReplaceMe</CodePage>", string.Empty)), 2856("Encoding.csproj", Resources.ProjectFiles.CSharp.Encoding.Replace("<CodePage>ReplaceMe</CodePage>", string.Empty)), 3285("Encoding.csproj", Resources.ProjectFiles.CSharp.Encoding.Replace("<CodePage>ReplaceMe</CodePage>", "<CodePage>1254</CodePage>")),
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Extensions\XElementExtensions.cs (1)
12=> element.Value.Replace("\n", "\r\n");
Workspaces\TestWorkspace_XmlConsumption.cs (2)
638markupCode = markupCode.Replace("$", "\uD7FF"); 649code = code.Replace("\uD7FF", "$");
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
CodeCleanup\FixIncorrectTokenTests.cs (2)
734=> text.Replace("\r\n", "\n").Replace("\n", "\r\n");
Formatter\FormatterTests.cs (2)
42=> Task.FromResult(document.WithText(SourceText.From($"Formatted with options: {lineFormattingOptions.ToString().Replace("\r", "\\r").Replace("\n", "\\n")}")));
Options\NamingStylePreferencesTests.cs (2)
111.Replace("SerializationVersion=\"4\"", "SerializationVersion=\"5\"") 112.Replace("<SymbolKind>Method</SymbolKind>", "<MethodKind>Ordinary</MethodKind>"),
SymbolKeyTests.cs (1)
1419var newTree = syntaxTree.WithChangedText(text.WithChanges(new TextChange(new TextSpan(0, text.Length), text.ToString().Replace(" ", " "))));
SyntaxPathTests.cs (1)
306var text2 = text.Replace(" ", " ");
Microsoft.Data.Analysis (2)
DataFrame.IO.cs (2)
729record.Append(stringCell.Replace("\"", "\"\"")); // Quotations in CSV data must be escaped with another quotation 762csvFile.Write(name.Replace("\"", "\"\"")); // Quotations in CSV data must be escaped with another quotation
Microsoft.DotNet.Arcade.Sdk (3)
src\GenerateChecksums.cs (1)
47string checksum = BitConverter.ToString(hash).Replace("-", string.Empty);
src\GenerateSourcePackageSourceLinkTargetsFile.cs (2)
92var contentFilesSourceLinkUrl = innerMostRootSourceLinkUrl.Replace("*", Uri.EscapeUriString(relativePathToSourceRoot.Replace('\\', '/')) + "*"); 110hash = BitConverter.ToString(hashAlg.ComputeHash(Encoding.UTF8.GetBytes(packageId)), 0, 20).Replace("-", "");
Microsoft.DotNet.AsmDiff (1)
MarkdownDiffExporter.cs (1)
225return name.Replace(".", "").ToLower();
Microsoft.DotNet.Build.Manifest (4)
BuildModelFactory.cs (2)
228repoUri = repoUri.Replace($"{parsedUri.UserInfo}@", string.Empty); 236repoUri = repoUri.Replace(parsedUri.Host, replacementUri);
VersionIdentifier.cs (2)
231pathSegments[i] = pathSegments[i].Replace(versionForSegment, ""); 244replacementIterationResult = replacementIterationResult.Replace(sequence.Key, sequence.Value);
Microsoft.DotNet.Build.Tasks.Feed (7)
src\ArtifactUrlHelper.cs (1)
87normalizedFileName = normalizedFileName.Replace("//", "/");
src\AzureStorageAssetPublisher.cs (1)
35blobPath = blobPath.Replace("\\", "/");
src\BlobFeedAction.cs (1)
89relativeBlobPath = $"{RelativePath}{relativeBlobPath}".Replace("\\", "/");
src\common\AzureStorageUtils.cs (1)
100BlobClient blob = GetBlob(blobPath.Replace("\\", "/"));
src\common\LatestLinksManager.cs (2)
115feedBaseUrl = feedBaseUrl.Replace(authority, replacementAuthority); 156return Path.Combine(latestLinkShortUrlPrefix, blobIdWithoutVersions).Replace("\\", "/");
src\PushToBuildStorage.cs (1)
385artifactModel.PipelineArtifactPath = relativePath.Replace(@"\", "/");
Microsoft.DotNet.Build.Tasks.Installers (14)
src\BuildFPMToolPreReqs.cs (12)
73str = str.Replace("{PACKAGE_NAME}", configJson.Package_Name); 74str = str.Replace("{PACKAGE_VERSION}", package_version); 75str = str.Replace("{PACKAGE_REVISION}", configJson.Release.Package_Revision); 76str = str.Replace("{URGENCY}", configJson.Release.Urgency); 77str = str.Replace("{CHANGELOG_MESSAGE}", configJson.Release.Changelog_Message); 78str = str.Replace("{MAINTAINER_NAME}", configJson.Maintainer_Name); 79str = str.Replace("{MAINTAINER_EMAIL}", configJson.Maintainer_Email); 81str = str.Replace("{DATE}", DateTime.UtcNow.ToString("ddd MMM dd yyyy")); 101str = str.Replace("{COPYRIGHT_TEXT}", configJson.CopyRight); 102str = str.Replace("{LICENSE_NAME}", configJson.License.Type); 103str = str.Replace("{LICENSE_NAME}", configJson.License.Type); 104str = str.Replace("{LICENSE_TEXT}", configJson.License.Full_Text);
src\CreateControlFile.cs (1)
80writer.WriteLine($"Description: {Description.Replace("\n", "\n ")}");
src\CreateRpmPackage.cs (1)
138kind = kind.Replace("broken symlink", "symlink");
Microsoft.DotNet.Build.Tasks.Templating.Tests (2)
GenerateFileFromTemplateTests.cs (2)
27Assert.Equal(ReadAllText("Directory.Build.props.in").Replace("${DefaultNetCoreTargetFramework}", "net6.0"), File.ReadAllText(filePath)); 55Assert.Equal(ReadAllText("Directory.Build.props.in").Replace("${DefaultNetCoreTargetFramework}", string.Empty), File.ReadAllText(filePath));
Microsoft.DotNet.Build.Tasks.VisualStudio (7)
OptProf\GenerateTrainingInputFiles.cs (1)
147string basePath = Path.Combine(outDir, entry.RelativeDirectoryPath.Replace("\\", "") + Path.GetFileNameWithoutExtension(entry.RelativeInstallationPath));
OptProf\IbcEntry.cs (5)
46relativeInstallationPath: args.RelativeInstallationFolder.Replace("/", "\\") + $"\\{assembly.Assembly}", 48ngenApplicationPath: Path.Combine(VSInstallationRootVar, args.InstrumentationExecutable.Replace("/", "\\"))); 79let filePath = $"{extensionDir}\\{fileName.TrimStart('/').Replace("/", "\\")}" 88let filePath = fileName.Replace("/Contents/", string.Empty).Replace("/", "\\")
Vsix\FinalizeInsertionVsixFile.cs (1)
123file["sha256"] = BitConverter.ToString(partHash).Replace("-", "");
Microsoft.DotNet.Build.Tasks.Workloads (8)
Msi\MsiBase.wix.cs (1)
156File.WriteAllText(eulaRtf, s_eula.Replace(__LICENSE_URL__, Metadata.LicenseUrl));
StringExtensions.cs (1)
46str = str.Replace(item.ItemSpec, item.GetMetadata(Metadata.Replacement));
Utils.cs (6)
56id.Replace("-", ".").Replace(" ", ".").Replace("_", ".") + 75content = content.Replace(token, tokenReplacements[token]); 109string escapedPattern = Regex.Escape(wildcardPattern).Replace(@"\*", ".*").Replace(@"\?", ".");
Microsoft.DotNet.Helix.Client (32)
generated-code\Aggregate.cs (2)
935"/api/aggregate/investigation/continue/{id}".Replace("{id}", Uri.EscapeDataString(Client.Serialize(id))), 1152"/api/aggregate/history/{analysisType}".Replace("{analysisType}", Uri.EscapeDataString(Client.Serialize(analysisType))),
generated-code\Analysis.cs (4)
93"/api/analysis/{job}/{analysisType}/reason".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))).Replace("{analysisType}", Uri.EscapeDataString(Client.Serialize(analysisType))), 191"/api/analysis/{job}/{analysisType}".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))).Replace("{analysisType}", Uri.EscapeDataString(Client.Serialize(analysisType))),
generated-code\Information.cs (1)
68"/api/info/queues/{queueId}".Replace("{queueId}", Uri.EscapeDataString(Client.Serialize(queueId))),
generated-code\Job.cs (6)
302"/api/jobs/{job}/results".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))), 377"/api/jobs/{job}/pf".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))), 452"/api/jobs/{job}".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))), 527"/api/jobs/{job}/details".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))), 603"/api/jobs/{job}/cancel".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))), 673"/api/jobs/{job}/wait".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))),
generated-code\Machine.cs (4)
77"/api/machines/{queueId}/{machineName}/state".Replace("{queueId}", Uri.EscapeDataString(Client.Serialize(queueId))).Replace("{machineName}", Uri.EscapeDataString(Client.Serialize(machineName))), 155"/api/machines/{queueId}/{machineName}/state".Replace("{queueId}", Uri.EscapeDataString(Client.Serialize(queueId))).Replace("{machineName}", Uri.EscapeDataString(Client.Serialize(machineName))),
generated-code\Telemetry.cs (5)
299"/api/telemetry/job/build/{id}/finish".Replace("{id}", Uri.EscapeDataString(Client.Serialize(id))), 486"/api/telemetry/job/xunit/{id}/finish".Replace("{id}", Uri.EscapeDataString(Client.Serialize(id))), 583"/api/telemetry/job/workitem/{id}/warning".Replace("{id}", Uri.EscapeDataString(Client.Serialize(id))), 680"/api/telemetry/job/workitem/{id}/error".Replace("{id}", Uri.EscapeDataString(Client.Serialize(id))), 777"/api/telemetry/job/workitem/{id}/log".Replace("{id}", Uri.EscapeDataString(Client.Serialize(id))),
generated-code\WorkItem.cs (10)
97"/api/jobs/{job}/workitems/{id}/files/{file}".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))).Replace("{id}", Uri.EscapeDataString(Client.Serialize(id))).Replace("{file}", Uri.EscapeDataString(Client.Serialize(file))), 178"/api/jobs/{job}/workitems/{id}/files".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))).Replace("{id}", Uri.EscapeDataString(Client.Serialize(id))), 263"/api/jobs/{job}/workitems/{id}/console".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))).Replace("{id}", Uri.EscapeDataString(Client.Serialize(id))), 333"/api/jobs/{job}/workitems".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))), 414"/api/jobs/{job}/workitems/{id}".Replace("{job}", Uri.EscapeDataString(Client.Serialize(job))).Replace("{id}", Uri.EscapeDataString(Client.Serialize(id))),
Microsoft.DotNet.Helix.JobSender (2)
JobDefinition.cs (2)
199string jobListUriForLogging = jobListUri.ToString().Replace(jobListUri.Query, ""); 217ResultContainerPrefix = $"{repoName}-{branchName}-".Replace("/", "-").ToLower();
Microsoft.DotNet.Helix.Sdk (3)
CreateXHarnessAndroidWorkItems.cs (2)
109apkName = apkName.Replace(".zip", ".apk"); 199return reader.ReadToEnd().Replace("<#%%USER COMMANDS%%#>", customCommands);
ProvisioningProfileProvider.cs (1)
230=> _profileUrlTemplate!.Replace("{PLATFORM}", platform.ToString());
Microsoft.DotNet.Internal.SymbolHelper (1)
SymbolUploadHelper.cs (1)
341relativeFilePath = relativeFilePath.Replace("//", "/");
Microsoft.DotNet.NuGetRepack.Tests (1)
TestHelpers\AssertEx.cs (1)
424Func<T, string> itemInspector = escapeQuotes ? new Func<T, string>(t => t.ToString().Replace("\"", "\"\"")) : null;
Microsoft.DotNet.SignCheckLibrary (3)
Utils.cs (3)
70string escapedPattern = Regex.Escape(wildcardPattern).Replace(@"\*", ".*").Replace(@"\?", "."); 279normalizedTimestamp = normalizedTimestamp.Replace(timezone, "+00:00").Trim();
Microsoft.DotNet.SignTool (2)
src\ContentUtil.cs (1)
51=> BitConverter.ToString(hash.ToArray()).Replace("-", "");
src\ZipData.cs (1)
607fileContents = fileContents.Replace(fileContents.Substring(index, end - index), stringToFind + createMD5SumsFileTask.InstalledSize);
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\UsagePattern.cs (1)
36string regex = Regex.Escape(IdentityGlob).Replace("\\*", ".*");
Microsoft.DotNet.StrongName (1)
Signing.cs (1)
72tokenStr = BitConverter.ToString(token).Replace("-", "").ToLowerInvariant();
Microsoft.DotNet.VersionTools.Cli (1)
VersionTrimmingOperation.cs (1)
64string newAssetFileName = assetFileName.Replace($".{info.Version}", null);
Microsoft.DotNet.XliffTasks.Tests (4)
AssertHelper.cs (2)
13expected.Replace("\r", string.Empty), 14actual.Replace("\r", string.Empty));
ResxDocumentTests.cs (1)
70</root>".Replace("ABSOLUTEPATH", expectedAbsoluteLocation);
VsctDocumentTests.cs (1)
93</CommandTable>".Replace("ABSOLUTEPATH", expectedAbsoluteLocation);
Microsoft.DotNet.XUnitAssert.Tests (4)
AsyncCollectionAssertsTests.cs (1)
770 Assert.Equal(message.Replace("$$ELLIPSIS$$", ArgumentFormatter.Ellipsis), ex.Message);
CollectionAssertsTests.cs (2)
872 Assert.Equal(message.Replace("$$ELLIPSIS$$", ArgumentFormatter.Ellipsis), ex.Message); 1026 Assert.Equal(message.Replace("$$ELLIPSIS$$", ArgumentFormatter.Ellipsis), ex.Message);
Sdk\ArgumentFormatterTests.cs (1)
83 Assert.Equal(expected.Replace("$$ELLIPSIS$$", ArgumentFormatter.Ellipsis), ArgumentFormatter.Format(value));
Microsoft.Extensions.AI.Abstractions (2)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (2)
567segment = segment.Replace("~", "~0").Replace("/", "~1");
Microsoft.Extensions.AI.Templates.Tests (1)
VerifyScrubbers.cs (1)
60string finalOutput = output.ToString().Replace(textToReplace, replacement);
Microsoft.Extensions.ApiDescription.Client (1)
artifacts\obj\Microsoft.Extensions.ApiDescription.Client\Release\netstandard2.0\Microsoft.Extensions.ApiDescription.Client.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.Extensions.Caching.SqlServer (2)
SqlQueries.cs (2)
87return "[" + identifier.Replace("]", "]]") + "]"; 92return literal.Replace("'", "''");
Microsoft.Extensions.Configuration.EnvironmentVariables (1)
EnvironmentVariablesConfigurationProvider.cs (1)
124private static string Normalize(string key) => key.Replace("__", ConfigurationPath.KeyDelimiter);
Microsoft.Extensions.Configuration.KeyPerFile (1)
KeyPerFileConfigurationProvider.cs (1)
43=> key.Replace(Source.SectionDelimiter, ConfigurationPath.KeyDelimiter);
Microsoft.Extensions.Configuration.KeyPerFile.Tests (2)
ConfigurationProviderTestBase.cs (2)
177string RemoveLineEnds(string source) => source.Replace("\n", "").Replace("\r", "");
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (4)
Linux\OSFileSystemTests.cs (4)
35var s = new string(bw.WrittenSpan).Replace("\r", ""); // Git is overwriting LF to CRLF all the time for windows, I am so tired of it I am hacking it!! 49var s = new string(bw.WrittenSpan).Replace("\r", ""); // Git is overwriting LF to CRLF all the time for windows, I am so tired of it I am hacking it!! 81var actual = line.ToString().Replace("\r", ""); 213Assert.Equal(expectedLines.ElementAt(cnt), line.ToString().Replace("\r", ""));
Microsoft.Extensions.Http.Polly (1)
artifacts\obj\Microsoft.Extensions.Http.Polly\Release\netstandard2.0\Microsoft.Extensions.Http.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.Extensions.Identity.Core (1)
artifacts\obj\Microsoft.Extensions.Identity.Core\Release\net10.0\Microsoft.Extensions.Identity.Core.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.Extensions.Localization (1)
artifacts\obj\Microsoft.Extensions.Localization\Release\net10.0\Microsoft.Extensions.Localization.Resources.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.Extensions.Localization.RootNamespace.Tests (1)
artifacts\obj\Microsoft.Extensions.Localization.RootNamespace.Tests\Release\net10.0\LocalizationTest.Abc.Resources.Controllers.ValuesController.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Microsoft.Extensions.Logging.Console (2)
SimpleConsoleFormatter.cs (1)
151string newMessage = message.Replace(oldValue, newValue);
SystemdConsoleFormatter.cs (1)
108string newMessage = message.Replace(Environment.NewLine, " ");
Microsoft.Extensions.Telemetry.Tests (3)
Latency\Internal\LatencyConsoleExporterTests.cs (3)
155private static string NormalizeLineEndings(string value) => value.Replace("\r\n", "\n").Replace("\r", "\n").Replace("\n", Environment.NewLine);
Microsoft.Gen.ComplianceReports (2)
Emitter.cs (2)
182.Replace("\\", "\\\\") 183.Replace("\"", "\\\"");
Microsoft.Gen.Logging (1)
Emission\Emitter.Utils.cs (1)
107internal static string EncodeTypeName(string typeName) => typeName.Replace("_", "__").Replace('.', '_');
Microsoft.Gen.MetadataExtractor (9)
src\Generators\Microsoft.Gen.ComplianceReports\Emitter.cs (2)
182.Replace("\\", "\\\\") 183.Replace("\"", "\\\"");
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
290metricNameFromAttribute = (arg.Value.Value ?? string.Empty).ToString().Replace("\\\\", "\\");
src\Generators\Microsoft.Gen.MetricsReports\MetricDefinitionEmitter.cs (6)
92OutLn($" \"MetricName\": \"{metricMethod.MetricName.Replace("\\", "\\\\").Replace("\"", "\\\"")}\","); 96OutLn($" \"MetricDescription\": \"{metricMethod.Summary.Replace("\\", "\\\\").Replace("\"", "\\\"")}\","); 114Out($" \"{dimension}\": \"{description.Replace("\\", "\\\\").Replace("\"", "\\\"")}\"");
Microsoft.Gen.Metrics (3)
MetricsGenerator.cs (2)
20SymbolLoader.CounterTAttribute.Replace("`1", "<T>"), 22SymbolLoader.HistogramTAttribute.Replace("`1", "<T>"),
Parser.cs (1)
290metricNameFromAttribute = (arg.Value.Value ?? string.Empty).ToString().Replace("\\\\", "\\");
Microsoft.Gen.MetricsReports (7)
MetricDefinitionEmitter.cs (6)
92OutLn($" \"MetricName\": \"{metricMethod.MetricName.Replace("\\", "\\\\").Replace("\"", "\\\"")}\","); 96OutLn($" \"MetricDescription\": \"{metricMethod.Summary.Replace("\\", "\\\\").Replace("\"", "\\\"")}\","); 114Out($" \"{dimension}\": \"{description.Replace("\\", "\\\\").Replace("\"", "\\\"")}\"");
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
290metricNameFromAttribute = (arg.Value.Value ?? string.Empty).ToString().Replace("\\\\", "\\");
Microsoft.Interop.ComInterfaceGenerator (1)
ComInterfaceInfo.cs (1)
218attrInfo.StringMarshallingCustomType.FullTypeName.Replace(TypeNames.GlobalAlias, ""),
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSSignatureContext.cs (1)
82string typeName = method.ContainingType.ToDisplayString(TypeAndContainingTypesStyle).Replace(".", "/");
Microsoft.Maui.Controls.Build.Tasks (2)
DebugXamlCTask.cs (1)
24 var paths = ReferencePath.Select(p => IOPath.GetDirectoryName(p.Replace("//", "/"))).Distinct();
XamlCTask.cs (1)
182 var paths = ReferencePath.Select(p => IOPath.GetDirectoryName(p.Replace("//", "/"))).Distinct();
Microsoft.Maui.Controls.SourceGen (3)
CodeBehindGenerator.cs (3)
306 sb.AppendLine($"\t[global::Microsoft.Maui.Controls.Xaml.XamlFilePath(\"{projItem.RelativePath?.Replace("\\", "\\\\")}\")]"); 436 accessModifier = classModifier?.ToLowerInvariant().Replace("notpublic", "internal") ?? "public"; // notpublic is WPF for internal 485 var accessModifier = fieldModifier?.ToLowerInvariant().Replace("notpublic", "internal") ?? "private"; //notpublic is WPF for internal
Microsoft.Maui.Resizetizer (10)
AndroidAdaptiveIconGenerator.cs (1)
156 .Replace("{name}", AppIconName);
AppleIconAssetsGenerator.cs (2)
29 var outputAppIconSetDir = Path.Combine(IntermediateOutputPath, DpiPath.Ios.AppIconPath.Replace("{name}", AppIconName)); 88 File.WriteAllText(appIconSetContentsFile, appIconContentsJson.Replace("\t", " "));
DpiPath.cs (1)
379 r.Path = r.Path.Replace("{name}", appIconName);
GenerateSplashStoryboard.cs (5)
130 .Replace("{color.red}", r) 131 .Replace("{color.green}", g) 132 .Replace("{color.blue}", b) 133 .Replace("{color.alpha}", a); 136 line = line.Replace("{imageView.image}", image);
ResizetizeImages.cs (1)
217 .Replace("{name}", appIconName);
Microsoft.ML.AutoML (1)
Utils\SweepableParamAttributes.cs (1)
96var name = type.FullName?.Replace("+", ".");
Microsoft.ML.AutoML.Interactive (3)
AutoMLMonitorKernelExtension.cs (2)
55summary.Add(p($"Trainer: {monitor.SweepablePipeline.ToString(monitor.BestTrial.TrialSettings.Parameter)}".Replace("Unknown=>", ""))); 65summary.Add(p($"Trainer: {monitor.SweepablePipeline.ToString(monitor.ActiveTrial.Parameter)}".Replace("Unknown=>", "")));
NotebookMonitor.cs (1)
53new KeyValuePair<string, object>("Trainer",SweepablePipeline.ToString(result.TrialSettings.Parameter).Replace("Unknown=>","")),
Microsoft.ML.AutoML.SourceGenerator (5)
Template\EstimatorType.cs (1)
180textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Template\SearchSpace.cs (1)
197textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Template\SweepableEstimator.cs (1)
199textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Template\SweepableEstimator_T_.cs (1)
204textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Template\SweepableEstimatorFactory.cs (1)
175textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Microsoft.ML.AutoML.Tests (1)
TrialResultManagerTest.cs (1)
83fileContent = fileContent.Replace(Environment.NewLine, "\r");
Microsoft.ML.CodeGenerator (11)
Templates\Azure\Console\AzureModelBuilder.cs (1)
274textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Azure\Model\AzureImageModelOutputClass.cs (1)
215textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Azure\Model\AzureObjectDetectionModelOutputClass.cs (1)
215textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\ConsumeModel.cs (1)
226textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\ModelBuilder.cs (1)
591textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\ModelInputClass.cs (1)
189textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\ModelOutputClass.cs (1)
232textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\ModelProject.cs (1)
221textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\PredictProgram.cs (1)
248textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\PredictProject.cs (1)
226textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Utils.cs (1)
94return $"@\"{val.ToString().Replace("\"", "\\\"")}\"";
Microsoft.ML.Core (2)
Data\Repository.cs (1)
520var pathEntTmp = pathEnt.Replace("/", "\\");
EntryPoints\ModuleArgs.cs (1)
376var name = type.FullName?.Replace("+", ".");
Microsoft.ML.Core.Tests (4)
UnitTests\TestEntryPoints.cs (4)
346.Replace(Environment.NewLine, "")) 569return path.Replace("\\", "\\\\"); 3384.Replace("\r", "\n") 3385.Replace("\n\n", "\n");
Microsoft.ML.Data (2)
Dirty\IniFileUtils.cs (1)
26ini = ini.Replace("Evaluators=" + numEvaluators, "Evaluators=" + (numEvaluators + 1));
EntryPoints\EntryPointNode.cs (1)
350return $"Node_{_idCount++:000}_{name.Replace(" ", "_")}";
Microsoft.ML.EntryPoints (1)
JsonUtils\JsonManifestUtils.cs (1)
319var typeString = $"{type}".Replace("Microsoft.ML.EntryPoints.", "");
Microsoft.ML.GenAI.Mistral (2)
Mistral_7B_0_3ChatTemplateBuilder.cs (2)
84schemaPrompt = schemaPrompt.Replace(":", ": "); 85schemaPrompt = schemaPrompt.Replace(",", ", ");
Microsoft.ML.OnnxTransformer (1)
OnnxTransform.cs (1)
573var columnName = onnxOutputName.EndsWith(stdSuffix) ? onnxOutputName.Replace(stdSuffix, "") : onnxOutputName;
Microsoft.ML.Parquet (1)
PartitionedFileLoader.cs (1)
569var cleanPath = path.Replace(@"\", @"/");
Microsoft.ML.SearchSpace.Tests (2)
TestBase.cs (2)
41return Path.Combine(testDataDir.FullName, fileName).Replace(cwd, "."); 53return Path.Combine(testDataDir.FullName, folderName).Replace(cwd, ".");
Microsoft.ML.Sweeper (1)
ConfigRunner.cs (1)
156options = options.Replace("$" + parameterValue.Name + "$", parameterValue.ValueText);
Microsoft.ML.TensorFlow.Tests (1)
TensorflowTests.cs (1)
1363Assert.Equal(string.Join(" ", input.B).Replace("/", " "), textOutput.BOut[0]);
Microsoft.ML.TestFramework (6)
BaseTestBaseline.cs (4)
558var line1Core = line1.Replace(" ", "").Replace("\t", ""); 559var line2Core = line2.Replace(" ", "").Replace("\t", "");
CopyAction.cs (2)
18Directory.CreateDirectory(dirPath.Replace(sourcePath, destinationPath)); 25var newPath = oldPath.Replace(sourcePath, destinationPath);
Microsoft.ML.Tests (11)
OnnxConversionTest.cs (6)
699}}", dataPath.Replace("\\", "\\\\"), modelPath.Replace("\\", "\\\\")); 731", modelPath.Replace("\\", "\\\\"), onnxJsonPath.Replace("\\", "\\\\"), onnxPath.Replace("\\", "\\\\")); 1827var colName = name.Replace(stdSuffix, "");
TextLoaderTests.cs (1)
1358line = line.Replace("\\n", "\n");
Transformers\TextFeaturizerTests.cs (4)
330Assert.Equal(data[0].A.Replace("123 ", "").Replace("425", "").Replace("25", "").Replace("23", ""), string.Join(" ", prediction1.OutputTokens));
Microsoft.ML.Tokenizers.Tests (1)
EnglishRobertaTests.cs (1)
294Assert.Equal(filteredToken![i], reverseVocab[encodingIds[i]].Replace("\u0120", " "));
Microsoft.Net.Http.Headers (2)
ContentDispositionHeaderValue.cs (2)
493result = result.ToString().Replace(@"\", @"\\").Replace(@"""", @"\""");
Microsoft.VisualBasic.Core (5)
Microsoft\VisualBasic\CompilerServices\VB6File.vb (1)
2349Return """" & Value.Replace("""", """""") & """"
Microsoft\VisualBasic\Strings.vb (4)
1682FormatString = FormatString.Replace("$", nfi.CurrencySymbol.Replace("'", "''")) 1685Return FormatString.Replace("n", NumberFormat) 1754FormatString = FormatString.Replace("-", """" & nfi.NegativeSign & """")
Microsoft.VisualStudio.LanguageServices (2)
Options\VisualStudioOptionStorage.cs (1)
55=> keyName.Replace(LanguagePlaceholder, language switch
Progression\GraphBuilder.cs (1)
412node.Label = symbol.Name.Replace("[]", string.Empty);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
ProjectSystemShim\LegacyProject\AnalyzersTests.cs (2)
146var pathWithExtraBackslashes = ruleSetFile.Path.Replace(@"\", @"\\"); 251File.WriteAllText(ruleSetFile.Path, ruleSetSource.Replace("Error", "Warning"));
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (2)
MockExtensionManager.vb (2)
39Return content.RelativePath.Replace("$RootFolder$", Path.Combine(TempRoot.Root, "ResolvedRootFolder")) 41Return content.RelativePath.Replace("$ShellFolder$", Path.Combine(TempRoot.Root, "ResolvedShellFolder"))
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
Help\VisualBasicHelpContextService.vb (1)
55Dim text = If(trivia.ToFullString(), String.Empty).Replace(" ", "").TrimStart("'"c)
MSBuild (4)
CommunicationsUtilities.cs (2)
192.Replace("/", "_") 193.Replace("=", string.Empty);
PrintLineDebuggerWriters.cs (1)
103return s.Replace(",", ";");
XMake.cs (1)
4134fileParameters = fileParameters.Replace(logFileParameter,
MSBuildTaskHost (2)
CommunicationsUtilities.cs (2)
192.Replace("/", "_") 193.Replace("=", string.Empty);
Mvc.Api.Analyzers.Test (4)
AddResponseTypeAttributeCodeFixProviderIntegrationTest.cs (2)
91.Replace("_INPUT_", "_TEST_") 92.Replace("_OUTPUT_", "_TEST_");
ApiActionsDoNotRequireExplicitModelValidationCheckCodeFixProviderTest.cs (2)
56.Replace("_INPUT_", "_TEST_") 57.Replace("_OUTPUT_", "_TEST_");
OpenIdConnectSample (1)
Startup.cs (1)
286await res.WriteAsync(HtmlEncoder.Default.Encode(payload.RootElement.ToString()).Replace(",", ",<br>") + "<br>");
PresentationBuildTasks (1)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\ResourceIDHelper.cs (1)
25Uri srcUri = new Uri(baseUri, relPath.Replace("#", "%23"));
PresentationCore (4)
MS\Internal\FontCache\FontCacheUtil.cs (4)
606return NormalizeFontFamilyReference(friendlyName.Substring(startIndex, length).Replace(",,", ",")); 676string fontFamilyReference = familyName.Replace("%", "%25").Replace("#", "%23"); 702return fontFamilyReference.Replace(",", ",,");
PresentationFramework (6)
System\Windows\Controls\AccessText.cs (2)
631string nexText = text.Replace(doubleAccessKeyMarker, accessKeyMarker); 687text = text.Replace(doubleAccessKeyMarker, accessKeyMarker);
System\Windows\Documents\RtfToXamlReader.cs (3)
281return s.Replace("\"", "&quot;"); 11273tokenName = tokenName.Replace("\r\n", ""); 11275tokenName = tokenName.Replace(";", "");
System\Windows\Markup\XamlParseException.cs (1)
287xamlFilePath = bamlFilePath.Replace(BamlExt, XamlExt);
RazorWebSite (2)
artifacts\obj\RazorWebSite\Release\net10.0\RazorWebSite.Resources.Models.ModelEnum.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
artifacts\obj\RazorWebSite\Release\net10.0\RazorWebSite.Resources.SingleType.cs (1)
24value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
Replay (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
580.Replace("/", "_") 581.Replace("=", string.Empty);
Roslyn.Test.Performance.Utilities (4)
Benchview.cs (2)
176arguments = arguments.Replace("\r\n", " ").Replace("\n", "");
VsPerfTest.cs (2)
61var finalTest = template.Replace("ReplaceWithActualSolutionPath", Path.Combine(TempDirectory, _zipFileToDownload, _solutionToTest)); 62finalTest = finalTest.Replace("ReplaceWithPerfLogDirectory", logDirectory);
Roslyn.VisualStudio.Next.UnitTests (1)
Services\PerformanceTrackerServiceTests.cs (1)
258var convert = name.Replace(@"\", ".");
RunTests (1)
HelixTestRunner.cs (1)
152var queuedBy = GetEnv("BUILD_QUEUEDBY", "roslyn").Replace(" ", "");
Security.TransportSecurity.IntegrationTests (1)
Negotiate\NegotiateStream_Http_Tests.4.1.0.cs (1)
182string spn = GetSPN().ToLowerInvariant().Replace("host", "HTTP");
Shared (2)
JsonSchemaExporter\JsonSchemaExporter.cs (2)
567segment = segment.Replace("~", "~0").Replace("/", "~1");
SignalR.Client.FunctionalTestApp (1)
Startup.cs (1)
157url = url.Replace("echoredirect", "echo");
SocialSample (1)
Startup.cs (1)
495await response.WriteAsync(HtmlEncoder.Default.Encode(payload.RootElement.ToString()).Replace(",", ",<br>") + "<br>");
System.ComponentModel.Annotations (4)
System\ComponentModel\DataAnnotations\AssociationAttribute.cs (1)
78return key.Replace(" ", string.Empty).Split(',');
System\ComponentModel\DataAnnotations\FileExtensionsAttribute.cs (2)
35Extensions.Replace(" ", string.Empty).Replace(".", string.Empty).ToLowerInvariant();
System\ComponentModel\DataAnnotations\PhoneAttribute.cs (1)
35ReadOnlySpan<char> valueSpan = valueAsString.Replace("+", string.Empty).AsSpan().TrimEnd();
System.Data.Common (8)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
179unquotedString = quotedString.Substring(prefixLength, quotedStringLength - (prefixLength + suffixLength)).Replace(quoteSuffix + quoteSuffix, quoteSuffix);
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (3)
452string keyname = (firstKey ? keypair.Value : keypair.Value.Replace("==", "=")).ToLowerInvariant(); 461keyvalue = keyvalue.Substring(1, keyvalue.Length - 2).Replace("\"\"", "\""); 464keyvalue = keyvalue.Substring(1, keyvalue.Length - 2).Replace("\'\'", "\'");
System\Data\Common\DbConnectionOptions.cs (3)
80builder.Append(keyName.Replace("=", "==")); 96builder.Append('{').Append(keyValue.Replace("}", "}}")).Append('}'); 124builder.Append(keyValue.Replace("\"", "\"\""));
System\Data\Filter\ConstNode.cs (1)
45_val = ((string)constant).Replace("''", "'");
System.Data.Odbc (7)
Common\System\Data\Common\DbConnectionOptions.cs (3)
142builder.Append(keyName.Replace("=", "==")); 157builder.Append('{').Append(keyValue.Replace("}", "}}")).Append('}'); 186builder.Append(keyValue.Replace("\"", "\"\""));
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
179unquotedString = quotedString.Substring(prefixLength, quotedStringLength - (prefixLength + suffixLength)).Replace(quoteSuffix + quoteSuffix, quoteSuffix);
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (3)
452string keyname = (firstKey ? keypair.Value : keypair.Value.Replace("==", "=")).ToLowerInvariant(); 461keyvalue = keyvalue.Substring(1, keyvalue.Length - 2).Replace("\"\"", "\""); 464keyvalue = keyvalue.Substring(1, keyvalue.Length - 2).Replace("\'\'", "\'");
System.Drawing.Common.Tests (1)
System\Drawing\IconTests.cs (1)
359string bitmapUncPath = $"\\\\{Environment.MachineName}\\{bitmapPath[..bitmapPathRoot.IndexOf(':')]}$\\{bitmapPath.Replace(bitmapPathRoot, "")}";
System.IO.Packaging (1)
System\IO\Packaging\PackUriHelper.PackUriScheme.cs (1)
294path = path.Replace(c.ToString(), Uri.HexEscape(c));
System.Net.Mail (1)
System\Net\Mail\MailAddress.cs (1)
267return "\"" + DisplayName.Replace("\"", "\\\"") + "\" " + SmtpAddress;
System.Net.Requests (2)
System\Net\FtpControlStream.cs (2)
981string escapedFilename = filename.Replace("%", "%25"); 982escapedFilename = escapedFilename.Replace("#", "%23");
System.Private.CoreLib (9)
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerableFactory.cs (4)
80expression = expression.Replace("\\", "\\\\"); 83expression = expression.Replace("\"", "\\\""); 84expression = expression.Replace(">", "\\>"); 85expression = expression.Replace("<", "\\<");
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
1201StringComparison.Ordinal => Replace(oldValue, newValue),
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (4)
624baseName = baseName.Replace(@"\\", @"\").Replace(@"\[", "[").Replace(@"\*", "*").Replace(@"\&", "&");
System.Private.CoreLib.Generators (3)
EventSourceGenerator.Emitter.cs (2)
60private {ec.ClassName}() : base(new Guid({ec.Guid.ToString("x").Replace("{", "").Replace("}", "")}), ""{ec.SourceName}"") {{ }}");
ProductVersionInfoGenerator.cs (1)
44public static Version Version => new Version({environmentVersion.Replace(".", ", ")});
System.Private.Windows.Core.Tests (2)
System\TypeExtensionsTests.cs (2)
29{ typeof(int), TypeName.Parse(typeof(int).AssemblyQualifiedName!.Replace("neutral", "en-US")), (int)TypeNameComparison.AssemblyCultureName, false }, 54TypeName.Parse(typeof(int).AssemblyQualifiedName!.Replace("7cec85d7bea7798e", "7cec00000ea7798e")),
System.Private.Windows.Core.TestUtilities (1)
DebuggerAttributes.cs (1)
155reference = reference.Replace(",nq", string.Empty);
System.Private.Xml (10)
System\Xml\Serialization\SoapReflectionImporter.cs (2)
752string strValue = Enum.Format(a.SoapDefaultValue.GetType(), a.SoapDefaultValue, "G").Replace(",", " "); 789typeName = typeName.Replace(argument, XsdTypeName(types[i]));
System\Xml\Serialization\XmlReflectionImporter.cs (2)
988typeName = typeName.Replace(argument, XsdTypeName(types[i])); 2160string strValue = Enum.Format(t, a.XmlDefaultValue, "G").Replace(",", " ");
System\Xml\Serialization\XmlSerializationWriterILGen.cs (5)
1521string arrayNamePlusA = $"{(arrayName).Replace(arrayTypeDesc.Name, "")}a{arrayElementTypeDesc.Name}"; 1522string arrayNamePlusI = $"{(arrayName).Replace(arrayTypeDesc.Name, "")}i{arrayElementTypeDesc.Name}"; 1541string iPlusArrayName = $"i{(arrayName).Replace(arrayTypeDesc.Name, "")}"; 1542string arrayNamePlusA = $"{(arrayName).Replace(arrayTypeDesc.Name, "")}a{arrayElementTypeDesc.Name}"; 1543string arrayNamePlusI = $"{(arrayName).Replace(arrayTypeDesc.Name, "")}i{arrayElementTypeDesc.Name}";
System\Xml\Xsl\XsltOld\SequentialOutput.cs (1)
682Write(value.Replace(s_CDataEnd, s_CDataSplit));
System.Security.Cryptography (1)
System\Security\Cryptography\X509Certificates\X500NameEncoder.ManagedDecode.cs (1)
122attributeValue = attributeValue.Replace("\"", "\"\"");
System.Security.Cryptography.Xml (4)
System\Security\Cryptography\Xml\Utils.cs (4)
323idref = idref.Replace("\'", ""); 324idref = idref.Replace("\"", ""); 342idref = idref.Replace("\'", ""); 343idref = idref.Replace("\"", "");
System.ServiceModel.Primitives.Tests (2)
ServiceModel\MessageContractTest.4.4.0.cs (2)
175string headerValue = header.ToString().Replace(Environment.NewLine, String.Empty).Replace(" ", String.Empty);
System.Text.RegularExpressions.Generator (4)
RegexGenerator.Emitter.cs (4)
31text.Replace("&", "&amp;").Replace("<", "&lt;").Replace(">", "&gt;"); 4086string containsExpr = indexOfExpr.Replace("IndexOf", "Contains");
System.Windows.Forms (2)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogButton.cs (2)
404string? text = _text?.Replace("\r\n", "\r").Replace("\n", "\r");
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\RichTextBoxDesigner.cs (1)
100value = value.Replace("\r\n", "\n");
System.Windows.Forms.UI.IntegrationTests (2)
Infra\SendInput.cs (2)
28string text = str.Replace("\r\n", "\r").Replace("\n", "\r");
System.Xaml (1)
System\Xaml\Parser\XamlText.cs (1)
102text = text.Replace(RETURN_STRING, "");
TagHelpersWebSite (3)
Components\DanViewComponent.cs (3)
16.Replace("#", colorReplacement) 17.Replace(Environment.NewLine, "<br>") 18.Replace("\n", "<br>");
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
320evaluatedString = evaluatedString.Replace("$(" + propertyName + ")", propertyValue);
Templates.Blazor.Tests (6)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
151var styleSheetHref = styleSheet.Href.Replace("_", string.Empty).Replace("about://", string.Empty);
src\ProjectTemplates\Shared\Project.cs (3)
112ProjectArguments = argString.Replace(hiveArg, ""); 293return str.Replace("\n", string.Empty).Replace("\r", string.Empty);
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
50ProjectGuid = GetRandomLetter() + Path.GetRandomFileName().Replace(".", string.Empty)
Templates.Blazor.WebAssembly.Auth.Tests (6)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
151var styleSheetHref = styleSheet.Href.Replace("_", string.Empty).Replace("about://", string.Empty);
src\ProjectTemplates\Shared\Project.cs (3)
112ProjectArguments = argString.Replace(hiveArg, ""); 293return str.Replace("\n", string.Empty).Replace("\r", string.Empty);
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
50ProjectGuid = GetRandomLetter() + Path.GetRandomFileName().Replace(".", string.Empty)
Templates.Blazor.WebAssembly.Tests (6)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
151var styleSheetHref = styleSheet.Href.Replace("_", string.Empty).Replace("about://", string.Empty);
src\ProjectTemplates\Shared\Project.cs (3)
112ProjectArguments = argString.Replace(hiveArg, ""); 293return str.Replace("\n", string.Empty).Replace("\r", string.Empty);
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
50ProjectGuid = GetRandomLetter() + Path.GetRandomFileName().Replace(".", string.Empty)
Templates.Mvc.Tests (8)
BlazorTemplateTest.cs (2)
197appRazorText = appRazorText.Replace("IComponentRenderMode?", "IComponentRenderMode").Replace(": null", ": null!");
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
151var styleSheetHref = styleSheet.Href.Replace("_", string.Empty).Replace("about://", string.Empty);
src\ProjectTemplates\Shared\Project.cs (3)
112ProjectArguments = argString.Replace(hiveArg, ""); 293return str.Replace("\n", string.Empty).Replace("\r", string.Empty);
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
50ProjectGuid = GetRandomLetter() + Path.GetRandomFileName().Replace(".", string.Empty)
Templates.Tests (9)
BaselineTest.cs (3)
80expectedFiles = expectedFiles.Select(f => f.Replace("{ProjectName}", Project.ProjectName)).ToArray(); 90var relativePath = file.Replace(Project.TemplateOutputDir, "").Replace("\\", "/").Trim('/');
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
151var styleSheetHref = styleSheet.Href.Replace("_", string.Empty).Replace("about://", string.Empty);
src\ProjectTemplates\Shared\Project.cs (3)
112ProjectArguments = argString.Replace(hiveArg, ""); 293return str.Replace("\n", string.Empty).Replace("\r", string.Empty);
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
50ProjectGuid = GetRandomLetter() + Path.GetRandomFileName().Replace(".", string.Empty)
vbc (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
580.Replace("/", "_") 581.Replace("=", string.Empty);
VBCSCompiler (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
580.Replace("/", "_") 581.Replace("=", string.Empty);
VBCSCompiler.UnitTests (7)
CompilerServerTests.cs (7)
224var outFile = srcFile.Replace("test.cs", "test.dll"); 353result.Output.Trim().Replace(srcFile, "test.cs")); 378~", result.Output.Trim().Replace(srcFile, "test.vb")); 401~", result.Output.Trim().Replace(srcFile, "test.vb")); 1185result.Output.Trim().Replace(srcFile, "SRC.VB")); 1234result.Output.Trim().Replace(srcFile, "SRC.VB")); 1341~", result.Output.Trim().Replace(srcFile, "src.vb"));
VisualBasicSyntaxGenerator (9)
Util\WriteUtils.vb (9)
557Dim newText = text.Replace(" ", " ") 602Return value.Replace("&", "&amp;").Replace("<", "&lt;").Replace(">", "&gt;") 620Dim filtered = text.Replace("<see ", "").Replace("/>", "").Replace("&amp;", "").Replace("&lt;", "").Replace("&gt;", "")
WinShimmer (1)
Program.cs (1)
42string compileReadyShimPath = $@"""{exePath.Replace(@"\", @"\\")}""";
XmlFileLogger (3)
ItemGroupParser.cs (2)
43items.Add(new Item(nameValue.Value.Replace("\r", ""))); 46items.Add(new Item(lines[i].Replace("\r", "")));
ObjectModel\Project.cs (1)
99new XAttribute("Name", Name.Replace("\"", string.Empty)),