1831 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 (1)
Model\ResourceOutgoingPeerResolver.cs (1)
168return s.Replace("127.0.0.1:", "localhost:");
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)
43var aspireAssemblyDirectory = currentAssemblyDirectory.Replace(currentAssemblyName, aspireDashboardAssemblyName);
Aspire.EndToEnd.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
155programCs = programCs.Replace("builder.Build().Run();", EndpointWritersCodeSnippet);
Aspire.Hosting (2)
ApplicationModel\ExpressionResolver.cs (2)
147.Replace("127.0.0.1", containerHostName) 148.Replace("[::1]", containerHostName);
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.AppContainers (3)
AzureContainerAppExtensions.cs (2)
235volumeName = volumeName.Replace(".", "").Replace("-", "");
ContainerAppContext.cs (1)
732var secretName = kv.Key.Replace("_", "-").ToLowerInvariant();
Aspire.Hosting.Azure.Tests (4)
AzureStorageExtensionsTests.cs (3)
428qs!.Replace("{storage.bindings." + name + ".host}", "127.0.0.1") 429.Replace("{storage.bindings." + name + ".scheme}", "http") 430.Replace("{storage.bindings." + name + ".port}", port.ToString());
RoleAssignmentTests.cs (1)
191s => s.Replace("\\r\\n", "\\n"));
Aspire.Hosting.Docker (7)
DockerComposeServiceExtensions.cs (7)
60var env = manifestExpressionProvider.ValueExpression.Replace("{", "") 61.Replace("}", "") 62.Replace(".", "_") 63.Replace("-", "_") 94var env = parameter.Name.ToUpperInvariant().Replace("-", "_"); 110var imageEnvName = $"{resourceInstance.Name.ToUpperInvariant().Replace("-", "_")}_IMAGE"; 124var containerPortEnv = $"{resourceInstance.Name.ToUpperInvariant().Replace("-", "_")}_PORT";
Aspire.Hosting.Docker.Tests (2)
DockerComposePublisherTests.cs (2)
271var firstContent = File.ReadAllText(envFilePath).Replace("PARAM1=", "PARAM1=changed"); 312var firstContent = File.ReadAllText(envFilePath).Replace("PARAM1=", "PARAM1=changed");
Aspire.Hosting.Kubernetes (4)
Extensions\HelmExtensions.cs (1)
27=> $"{resourceName.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)
156string 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)
577.Replace("/", "_") 578.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 (55)
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 (9)
100string srcPath = project.FullPath.Replace("csproj", "cs"); 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); 185var referenceNamespace = PathHelper.GetRelativePath(referenceFolderName, project.DirectoryPath).Replace("\\", ".").Replace("/", ".").Replace(" ", "_");
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 (11)
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) 332File.WriteAllText(jsonFileDstPath, File.ReadAllText(jsonFileDstPath).Replace("$testCaseProject$", this_TestCaseProject.FullPath.Replace("\\", "/"))); 349var optionsJson = options.Json.Replace(this_TestCaseProject.FullPath.Replace("\\", "/"), "$testCaseProject$");
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 (13)
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("<", "\\<");
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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
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));
GenerateRulesMissingDocumentation (1)
Program.cs (1)
78var escapedTitle = descriptor.Title.ToString(CultureInfo.InvariantCulture).Replace("<", "\\<");
GetDocument.Insider (2)
artifacts\obj\GetDocument.Insider\Release\net10.0\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)
38var text = File.ReadAllText(csFilePath).Replace("<auto-generated />", "") 39.Replace($"{{{Environment.NewLine}{Environment.NewLine}", "{") 40.Replace($"}}{Environment.NewLine}{Environment.NewLine}", "}") 41.Replace($"{{{Environment.NewLine}", "{") 42.Replace($"}}{Environment.NewLine}", "}") 43.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("\"", "\\\"")}\"";
Metrics (9)
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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
241_stringBuilder.Append(value.Replace("\"", "\"\""));
Metrics.Legacy (9)
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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
241_stringBuilder.Append(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('/', '\\'); 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\net10.0\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)
1206var lines = content.Replace("\r\n", "\n").Split('\n'); 1324Assert.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.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 (1)
Services\Schemas\OpenApiSchemaService.cs (1)
222var relativeSchemaId = $"#/components/schemas/{rootSchemaId}{refIdString.Replace("#", string.Empty)}";
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
XmlCommentGenerator.Emitter.cs (1)
571.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.Tasks.CodeAnalysis (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
577.Replace("/", "_") 578.Replace("=", string.Empty);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
577.Replace("/", "_") 578.Replace("=", string.Empty);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (7)
DotNetSdkTests.cs (6)
34var escapedRoot1 = root1.Replace(",", ",,").Replace("=", "=="); 35var escapedRoot2 = root2.Replace(",", ",,").Replace("=", "=="); 36var escapedRoot3 = root3.Replace(",", ",,").Replace("=", "==");
TestUtilities\TaskTestUtil.cs (1)
42var commandLine = message.CommandLine.Replace(" ", " ").Trim();
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.Analyzers (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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
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));
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
241_stringBuilder.Append(value.Replace("\"", "\"\""));
Microsoft.CodeAnalysis.BannedApiAnalyzers (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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
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));
Microsoft.CodeAnalysis.CodeStyle (13)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (3)
75var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(tree.FilePath)); 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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
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 (5)
Compiler\DocumentationCommentCompiler.cs (2)
1150return "!:" + tmp.ToString().Replace("{", "&lt;").Replace("}", "&gt;");
Symbols\Source\SourcePropertySymbolBase.cs (1)
523return SourceName.Replace(" ", "");
Symbols\Symbol.cs (2)
1001return s.Replace("<", "&lt;").Replace(">", "&gt;");
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)
60TestCode = source.Replace("[||]", ""), 80source = source.Replace("[||]", ""); 890TestCode = source.Replace("[||]", ""),
src\Analyzers\CSharp\Tests\UseCompoundAssignment\UseCompoundAssignmentTests.cs (4)
1189var before = expressionContext.Replace("$$", "i [|=|] i + 1"); 1190var after = expressionContext.Replace("$$", "++i"); 1216var before = expressionContext.Replace("$$", "i [|=|] i + 1"); 1217var after = expressionContext.Replace("$$", "++i");
src\Analyzers\CSharp\Tests\UseSystemThreadingLock\UseSystemThreadingLockTests.cs (5)
218""" + SystemThreadingLockTypePolyFill.Replace("public", "internal"), 239""" + SystemThreadingLockTypePolyFill.Replace(" Scope", " Scope1"), 261.Replace("public ref struct", "private ref struct") 262.Replace("public Scope", "private Scope"), 283""" + SystemThreadingLockTypePolyFill.Replace("public ref struct", "public struct"),
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (14)
CommandLineTests.cs (12)
79s_CSharpScriptExecutable = s_CSharpCompilerExecutable.Replace("csc.exe", Path.Combine("csi", "csi.exe")); 1226parsedArgs.SourceFiles.Select((file) => file.Path.Replace(dir.ToString(), "{DIR}"))); 1231parsedArgs.SourceFiles.Select((file) => file.Path.Replace(dir.ToString(), "{DIR}"))); 5996.Replace(Environment.NewLine, string.Empty), workingDirectory: tempDir) : 6031.Replace(Environment.NewLine, string.Empty), workingDirectory: tempDir) : 6111.Replace(Environment.NewLine, string.Empty)) : 6137Assert.Equal("SRC.CS(1,1): error CS1056: Unexpected character '?'", tempOut.ReadAllText().Trim().Replace(srcFile, "SRC.CS")); 6152Assert.Equal("SRC.CS(1,1): error CS1056: Unexpected character '♚'", tempOut.ReadAllText().Trim().Replace(srcFile, "SRC.CS")); 8005outWriter.ToString().Replace(Path.GetFileName(src.Path), "{FILE}").Trim()); 14602pathMapArgument = pathMapArgument.Replace("DIRPATH", dir.Path).Replace("SRCDIRPATH", srcDir.Path).Replace("OBJDIRPATH", objDir.Path);
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 (75)
CodeActions\InitializeParameter\AddParameterCheckTests.cs (24)
548throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(a)}").Replace(""" 557throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(b)}").Replace(""" 566throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(c)}").Replace(""" 638throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(a)}").Replace(""" 647throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(b)}").Replace(""" 699throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(a)}").Replace(""" 708throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(c)}").Replace(""" 743throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(a)}").Replace(""" 752throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(c)}").Replace(""" 788throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(a)}").Replace(""" 802throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(c)}").Replace(""" 1872throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 1908throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_whitespace, "{nameof(s)}").Replace(""" 1975throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2029throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(bar)}").Replace(""" 2594throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2634throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2675throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2715if (string.IsNullOrEmpty(s)) throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2754if (string.IsNullOrEmpty(s)) throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 2795throw new ArgumentException($"{{string.Format(FeaturesResources._0_cannot_be_null_or_empty, "{nameof(s)}").Replace(""" 3491throw new ArgumentOutOfRangeException(nameof(num), num, $"{{string.Format(FeaturesResources._0_cannot_be_negative, "{nameof(num)}").Replace("\"", "\\\"")}}"); 3512throw new ArgumentOutOfRangeException(nameof(num), num, $"{{string.Format(FeaturesResources._0_cannot_be_negative_or_zero, "{nameof(num)}").Replace("\"", "\\\"")}}"); 3727throw new ArgumentOutOfRangeException(nameof(i), i, $"{{string.Format(FeaturesResources._0_cannot_be_negative, "{nameof(i)}").Replace("\"", "\\\"")}}");
CodeActions\InlineMethod\CSharpInlineMethodTests.cs (4)
2952""".Replace("(op)", op), 2967""".Replace("(op)", op)); 3019""".Replace("(op)", op), 3034""".Replace("(op)", op));
CompleteStatement\CSharpCompleteStatementCommandHandlerTests.cs (2)
266var expected = CreateTestWithMethodCall($@"var test = Console.WriteLine({argument.Replace("$$", "")});$$"); 4538var expected = code.Replace("$$", ";$$");
Completion\CompletionProviders\LoadDirectiveCompletionProviderTests.cs (1)
82var text = textWithPositionMarker.Replace("$$", "");
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (1)
121var text = textWithPositionMarker.Replace("$$", "");
Completion\CompletionProviders\SymbolCompletionProviderTests.cs (2)
10200return 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)
1303await AssertIndentUsingSmartTokenFormatterAsync(code.Replace(" ", "\t"), ch, indentationLine, expectedIndentation, useTabs: true).ConfigureAwait(false); 1343await AssertIndentNotUsingSmartTokenFormatterButUsingIndenterAsync(code.Replace(" ", "\t"), indentationLine, expectedIndentation, useTabs: true, indentStyle).ConfigureAwait(false);
Formatting\Indentation\SmartIndenterTests.cs (3)
3665AssertSmartIndentInProjection(markup.Replace(" ", "\t"), expectedIndentation, useTabs: true, options, indentStyle); 3720AssertSmartIndent(code.Replace(" ", "\t"), indentationLine, expectedIndentation, useTabs: true, options, indentStyle); 3750AssertSmartIndent(code.Replace(" ", "\t"), expectedIndentation, useTabs: true, options, indentStyle);
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (4)
3121markup = markup.Replace(" ", "\t"); 3122expected = expected.Replace(" ", "\t"); 3154await AutoFormatOnMarkerAsync(initialMarkup.Replace(" ", "\t"), expected.Replace(" ", "\t"), useTabs: true, tokenKind, startTokenKind).ConfigureAwait(false);
Formatting\Indentation\SmartTokenFormatterFormatTokenTests.cs (12)
409actualIndentation = await GetSmartTokenFormatterIndentationAsync(code.Replace(" ", "\t"), indentationLine: 5, ch: '#', useTabs: true); 430actualIndentation = await GetSmartTokenFormatterIndentationAsync(code.Replace(" ", "\t"), indentationLine: 5, ch: 'n', useTabs: true); 452actualIndentation = await GetSmartTokenFormatterIndentationAsync(code.Replace(" ", "\t"), indentationLine: 5, ch: 'n', useTabs: true); 478actualIndentation = await GetSmartTokenFormatterIndentationAsync(code.Replace(" ", "\t"), indentationLine: 9, ch: 't', useTabs: true); 504actualIndentation = await GetSmartTokenFormatterIndentationAsync(code.Replace(" ", "\t"), indentationLine: 9, ch: 'e', useTabs: true); 511await AssertSmartTokenFormatterOpenBraceWithBaseIndentationAsync(markup.Replace(" ", "\t"), baseIndentation, expectedIndentation, useTabs: true).ConfigureAwait(false); 536await AssertSmartTokenFormatterOpenBraceAsync(code.Replace(" ", "\t"), indentationLine, expectedSpace, useTabs: true, baseIndentation, span).ConfigureAwait(false); 557await AssertSmartTokenFormatterOpenBraceAsync(expected.Replace(" ", "\t"), code.Replace(" ", "\t"), indentationLine, useTabs: true).ConfigureAwait(false); 578await AssertSmartTokenFormatterCloseBraceWithBaseIndentation(markup.Replace(" ", "\t"), baseIndentation, expectedIndentation, useTabs: true).ConfigureAwait(false); 603await AssertSmartTokenFormatterCloseBraceAsync(code.Replace(" ", "\t"), indentationLine, expectedSpace, useTabs: true, baseIndentation, span).ConfigureAwait(false); 623await ExpectException_SmartTokenFormatterCloseBraceAsync(code.Replace(" ", "\t"), indentationLine, useTabs: true).ConfigureAwait(false);
RawStringLiteral\RawStringLiteralCommandHandlerTests.cs (2)
52expectedCode = expectedCode.Replace("$", "\uD7FF"); 59massaged = massaged.Replace("\uD7FF", "$");
Rename\CSharpInlineRenameServiceTests.cs (1)
81var escapedPath = Path.Combine(TestWorkspace.RootDirectory, "test1.cs").Replace("\\", "\\\\");
SignatureHelp\InvocationExpressionSignatureHelpProviderTests.cs (6)
1632await TestAsync(markup.Replace("ARGUMENTS", arguments), [new SignatureHelpTestItem("void Program.M(int i1, int i2, int i3)", currentParameterIndex: expectedParameterIndex, isSelected: true)]); 1657await TestAsync(markup.Replace("ARGUMENTS", arguments), [new SignatureHelpTestItem("void Delegate(int i1, int i2, int i3)", currentParameterIndex: expectedParameterIndex, isSelected: true)]); 1691await TestAsync(markup.Replace("ARGUMENTS", arguments), [ 1716await TestAsync(markup.Replace("ARGUMENTS", arguments), [new SignatureHelpTestItem($"void Program.M(string s, string s2)", currentParameterIndex: expectedParameterIndex, isSelected: true)]); 1750await TestAsync(markup.Replace("ARGUMENTS", arguments), [new SignatureHelpTestItem("void Program.M(int i1, params int[] i2)", currentParameterIndex: expectedParameterIndex, isSelected: true)]); 1797await TestAsync(markup.Replace("ARGUMENTS", arguments), [new SignatureHelpTestItem("void Program.M(int i, string s)", currentParameterIndex: expectedParameterIndex, isSelected: true)]);
SignatureHelp\ObjectCreationExpressionSignatureHelpProviderTests.cs (2)
690await TestAsync(markup.Replace("ARGUMENTS", arguments), [ 715await TestAsync(markup.Replace("ARGUMENTS", arguments),
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (2)
161expectedMarkup = expectedMarkup.Replace("$", NON_TEST_CHARACTER); 165expected = 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 (35)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (5)
73var actualTree = TreeToText(tree).Replace(""" 78AssertEx.Equal(expectedTree!.Replace(""" 89var actualDiagnostics = DiagnosticsToText(tree.Diagnostics).Replace(""" 94AssertEx.Equal(RemoveMessagesInNonSupportedLanguage(expectedDiagnostics).Replace(""" 324trivia.VirtualChars.CreateString().Replace("\f", "\\f"));
EmbeddedLanguages\Json\CSharpJsonParserTests_NstTests.cs (2)
20var actualTree = TreeToText(tree!).Replace(""" 25Assert.Equal(expected.Replace("""
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (2)
51.Replace("&quot;", """ 161Assert.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)
50var pattern = obj.Value<string>("Pattern")!.Replace("""
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (107)
CodeGen\CodeGenAsyncIteratorTests.cs (5)
90return runner.Replace("ITERATIONS", iterations.ToString()); 5570var source = template.Replace("POSITION", position.ToString()); 5663var source = template.Replace("POSITION", position.ToString()); 7559var comp = CreateCompilationWithAsyncIterator(new[] { source.Replace("SOURCETOCANCEL", sourceToCancel), EnumeratorCancellationAttributeType }, options: options); 7619var 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)
1205string source1 = sourceTemplate.Replace("CHANGE", change1); 1209var source2 = sourceTemplate.Replace("CHANGE", change2); 2094string 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)
10602var source0 = MarkedSource(template.Replace("<<VALUE>>", "0")); 10603var source1 = MarkedSource(template.Replace("<<VALUE>>", "1")); 10604var source2 = MarkedSource(template.Replace("<<VALUE>>", "2")); 10673v0.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "0")); 10687diff1.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "1")); 10701diff2.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "2")); 10725var source0 = MarkedSource(template.Replace("<<VALUE>>", "0")); 10726var source1 = MarkedSource(template.Replace("<<VALUE>>", "1")); 10727var source2 = MarkedSource(template.Replace("<<VALUE>>", "2")); 10796v0.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "0")); 10810diff1.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "1")); 10824diff2.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "2")); 10957var source0 = MarkedSource(template.Replace("<<VALUE>>", "0")); 10958var source1 = MarkedSource(template.Replace("<<VALUE>>", "1")); 10959var source2 = MarkedSource(template.Replace("<<VALUE>>", "2")); 11022diff1.VerifyIL("C.F", baselineIL.Replace("<<VALUE>>", "1")); 11032diff2.VerifyIL("C.F", baselineIL.Replace("<<VALUE>>", "2")); 11634var source0 = MarkedSource(template.Replace("<<VALUE>>", "0")); 11635var source1 = MarkedSource(template.Replace("<<VALUE>>", "1")); 11636var 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 (88)
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 (2)
1853string outputStringType = stringType.Replace("string", "System.String"); 42445.Replace("ReadOnlySingleElementList<T>", "<>z__ReadOnlySingleElementList<T>");
Semantics\ExtensionOperatorsTests.cs (12)
3687""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 3761""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 3827""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 9910""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 9989""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 10060""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 18425""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 18501""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 18569""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 26513""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 26595""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 26669""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]"));
Semantics\ExtensionTests.cs (30)
4953""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 5076verifier1.VerifyTypeIL("Extensions", expectedTypeIL.Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 5480""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 5665""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 6036""").Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 6354""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 6515""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 6853""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 7113""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 7524""").Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 7825""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 7993verifier1.VerifyTypeIL("Extensions", expectedTypeIL.Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 8509""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 8692""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 9061""").Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 9343""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 9488verifier1.VerifyTypeIL("Extensions", expectedTypeIL.Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 9774verifier1.VerifyTypeIL("Extensions", expectedTypeIL.Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 9986""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 10163""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 10313""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 10458""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 10602""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 10744""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]")); 10947""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]"). 10948Replace("[System.Core]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[System.Core]")); 11110""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]"). 11111Replace("[System.Core]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[System.Core]")); 11265""".Replace("[mscorlib]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[mscorlib]"). 11266Replace("[System.Core]", ExecutionConditionUtil.IsMonoOrCoreClr ? "[netstandard]" : "[System.Core]"));
Semantics\ParamsCollectionTests.cs (3)
5395string outputStringType = stringType.Replace("string", "System.String"); 12817adjustedMemberName = adjustedMemberName.Replace("<>", "<" + comp.SourceAssembly.Name + ">"); 12818adjustedMemberDisplay = adjustedMemberDisplay.Replace("<>", "<" + comp.SourceAssembly.Name + ">");
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 (23)
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]")); 17077").Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 17344").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]")); 18510").Replace("[netstandard]", RuntimeUtilities.IsCoreClrRuntime ? "[netstandard]" : "[mscorlib]")); 18829").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]"));
Semantics\RecordTests.cs (3)
13911ilSource: ilSource_template.Replace("INJECT", inject).Replace("RAN", ranBody).Replace("THROW", throwBody),
Symbols\UserDefinedCompoundAssignmentOperatorsTests.cs (2)
17761return 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)
600""".Replace("<", "&lt;").Replace(">", "&gt;"); 664""".Replace("<", "&lt;").Replace(">", "&gt;"); 736""".Replace("<", "&lt;").Replace(">", "&gt;"); 870""".Replace("<", "&lt;").Replace(">", "&gt;"); 883""".Replace("<", "&lt;").Replace(">", "&gt;"); 1024""".Replace("<", "&lt;").Replace(">", "&gt;");
Diagnostics\Suppression\SuppressionTest_FixAllTests.cs (12)
449.Replace("<", "&lt;").Replace(">", "&gt;"); 559.Replace("<", "&lt;").Replace(">", "&gt;"); 667""".Replace("<", "&lt;").Replace(">", "&gt;"); 681""".Replace("<", "&lt;").Replace(">", "&gt;"); 819.Replace("<", "&lt;").Replace(">", "&gt;"); 917.Replace("<", "&lt;").Replace(">", "&gt;");
Diagnostics\Suppression\SuppressionTests.cs (9)
2246expected = expected.Replace("class Class", "[|class Class|]"); 2287expected = expected.Replace("class Class", "[|class Class|]"); 2330expected = expected.Replace("class Class", "[|class Class|]"); 2376expected = expected.Replace("class Class", "[|class Class|]"); 2422expected = expected.Replace("class Class", "[|class Class|]"); 2468expected = expected.Replace("int Method()", "[|int Method()|]"); 2512expected = expected.Replace("public void Method(int unused)", "[|public void Method(int unused)|]"); 2548expected = expected.Replace("public void Method(int unused)", "[|public void Method(int unused)|]"); 2585expected = expected.Replace("public void Method(int unused)", "[|public void Method(int unused)|]");
EditAndContinue\BreakpointSpansTests.cs (8)
4989TestSpan(source.Replace("class", keyword)); 5006TestSpan(source.Replace("class", keyword)); 5027TestSpan(source.Replace("record", keyword)); 5042TestMissing(source.Replace("class", keyword)); 5069TestSpan(source.Replace("class", keyword)); 5084TestSpan(source.Replace("class", keyword)); 5099TestSpan(source.Replace("record", keyword)); 5112TestMissing(source.Replace("class", keyword));
EditAndContinue\StatementEditingTests.cs (2)
12735newStatement ??= oldStatement.Replace("old", "@new"); 12806var newStatement = oldStatement.Replace("old", "@new");
EnableNullable\EnableNullableTests.cs (3)
730var fixedDirective = directive.Replace("$$", "").Replace("restore", "disable"); 853var fixedDirective = directive.Replace("$$", "");
FullyQualify\FullyQualifyTests.cs (2)
114""".Replace(@"\t", "\t"), 123""".Replace(@"\t", "\t"), testHost: testHost);
SimplifyTypeNames\SimplifyTypeNamesTests.cs (2)
1114var newContent = content.Replace(@"[||]", pair.Key); 1115var expected = content.Replace(@"[||]", pair.Value);
src\Analyzers\CSharp\Tests\GenerateDefaultConstructors\GenerateDefaultConstructorsTests.cs (3)
60TestCode = source.Replace("[||]", ""), 80source = source.Replace("[||]", ""); 890TestCode = source.Replace("[||]", ""),
src\Analyzers\CSharp\Tests\UseCompoundAssignment\UseCompoundAssignmentTests.cs (4)
1189var before = expressionContext.Replace("$$", "i [|=|] i + 1"); 1190var after = expressionContext.Replace("$$", "++i"); 1216var before = expressionContext.Replace("$$", "i [|=|] i + 1"); 1217var after = expressionContext.Replace("$$", "++i");
src\Analyzers\CSharp\Tests\UseSystemThreadingLock\UseSystemThreadingLockTests.cs (5)
218""" + SystemThreadingLockTypePolyFill.Replace("public", "internal"), 239""" + SystemThreadingLockTypePolyFill.Replace(" Scope", " Scope1"), 261.Replace("public ref struct", "private ref struct") 262.Replace("public Scope", "private Scope"), 283""" + SystemThreadingLockTypePolyFill.Replace("public ref struct", "public struct"),
UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzerTests.cs (1)
89return initialMarkup.Replace("EXPRESSION", expression);
UseRecursivePatterns\UseRecursivePatternsRefactoringTests.cs (1)
258return 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 (72)
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 (3)
313var actualMembers = nativeIntegerMembers.WhereAsArray(m => includeNativeIntegerMember(m)).Sort(SymbolComparison).SelectAsArray(m => m.ToTestDisplayString().Replace(signed ? "nint" : "nuint", signed ? "System.IntPtr" : "System.UIntPtr")); 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) }); 76817var comp = CreateCompilation(source.Replace("OPERATOR", op), options: WithNullableEnable()); 113218var comp1 = CreateCompilation(new[] { source.Replace("PLACEHOLDER", "") }); 113221var comp2 = CreateCompilation(new[] { source.Replace("PLACEHOLDER", "annotations") }); 113261var source1 = source0.Replace("PLACEHOLDER", ""); 113262var source2 = source0.Replace("PLACEHOLDER", "annotations"); 113297verify(source.Replace("PLACEHOLDER", "")); 113298verify(source.Replace("PLACEHOLDER", "annotations")); 113327var source1 = source0.Replace("PLACEHOLDER", ""); 113328var source2 = source0.Replace("PLACEHOLDER", "annotations"); 113365verify(source.Replace("PLACEHOLDER", "")); 113366verify(source.Replace("PLACEHOLDER", "annotations")); 113399var source1 = source0.Replace("PLACEHOLDER", ""); 113400var 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)
7660return 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 (15)
LexicalAndXml\LexicalTests.cs (1)
4588code = code.Replace("\n", "\r\n");
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)
10008""".Replace("&nbsp;", "\u00A0"));
Microsoft.CodeAnalysis.EditorFeatures (4)
EditorConfigSettings\Updater\SettingsUpdateHelper.cs (3)
258fileName = fileName.Replace(".", @"\."); 259fileName = fileName.Replace("*", ".*"); 260fileName = fileName.Replace("/", @"\/");
Suggestions\SuggestedActions\SuggestedAction.cs (1)
221return text.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)
176{classification}, "{classifiedTextRun.Text.Replace("\"", "\"\"")}" 181"{classifiedTextRun.Tooltip.Replace("\"", "\"\"")}"
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
CodeFixes\CodeFixServiceTests.cs (1)
1037code = code.Replace(priorSnapshotFixLine, "int x2 = 0;");
CodeGeneration\CodeGenerationTests.cs (6)
147expected = expected.Replace("$$", statements); 191expected = expected.Replace("$$", statements); 277expected = expected.Replace("$$", statements); 309expected = expected.Replace("$$", statements); 428expected = expected.Replace("$$", getStatements); 433expected = 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)
472return str.Replace("\"", "\\\"");
Microsoft.CodeAnalysis.Features (22)
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (2)
104bannerText = bannerText.Replace(fileName, BannerFileNamePlaceholder); 113equivalenceKey = equivalenceKey.Replace(BannerFileNamePlaceholder, fileName);
AddFileBanner\AddFileBannerHelpers.cs (1)
62var updated = createTrivia(trivia, trivia.ToFullString().Replace(sourceName, destinationName));
CodeFixes\Configuration\ConfigurationUpdater.cs (3)
582fileName = fileName.Replace(".", @"\."); 583fileName = fileName.Replace("*", ".*"); 584fileName = fileName.Replace("/", @"\/");
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (1)
86result.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 (3)
75var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(tree.FilePath)); 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\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)
508var code = text.GetSubText(text.Lines.GetTextSpan(span.Span)).ToString().Replace("\r\n", " "); 542Old = partners.Key.ToString().Replace("\r\n", " ").Replace("\n", " "), 543New = partners.Value.ToString().Replace("\r\n", " ").Replace("\n", " ")
EditAndContinue\MatchingPair.cs (2)
21""" + Old.Replace(""" 27""" + New.Replace("""
Microsoft.CodeAnalysis.Features.UnitTests (2)
FindUsages\DefinitionItemFactoryTests.cs (2)
40"{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)
192return 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); 996text = text.Replace(" ", "&nbsp;");
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (5)
Diagnostics\PullDiagnosticTests.cs (1)
2047var dir = TestWorkspace.RootDirectory.Replace("\\", "/");
Hover\HoverTests.cs (3)
557&nbsp;&nbsp;&nbsp;&nbsp;{string.Format(FeaturesResources._0_1, "Net472", FeaturesResources.Available).Replace("-", "\\-")} 558&nbsp;&nbsp;&nbsp;&nbsp;{string.Format(FeaturesResources._0_1, "NetCoreApp3", FeaturesResources.Not_Available).Replace("-", "\\-")} 560{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.PerformanceSensitiveAnalyzers (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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
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));
Microsoft.CodeAnalysis.PublicApiAnalyzers (9)
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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
241_stringBuilder.Append(value.Replace("\"", "\"\""));
Microsoft.CodeAnalysis.ResxSourceGenerator (9)
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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
241_stringBuilder.Append(value.Replace("\"", "\"\""));
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (2)
ResxGeneratorTests.cs (2)
808var id = string.Join("_", noWarn.Replace(" ", "").Split(",", System.StringSplitOptions.TrimEntries | System.StringSplitOptions.RemoveEmptyEntries)); 844var id = string.Join("_", noWarn.Replace(" ", "").Split(",", System.StringSplitOptions.TrimEntries | System.StringSplitOptions.RemoveEmptyEntries));
Microsoft.CodeAnalysis.Test.Utilities (27)
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\CompilationTestDataExtensions.cs (1)
37expectedIL = expectedIL.Replace(moduleNamePlaceholder, moduleName);
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); 220s = s.Replace("\"", "\"\""); 223return formattable.ToString(null, CultureInfo.InvariantCulture).Replace("\"", "\"\""); 225return constant.ToString().Replace("\"", "\"\"");
CompilationVerifier.cs (1)
292return 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)
149return 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)
1854symbolList = 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)
4319code = code.Replace("System.IDisposable.Dispose", "IDisposable.Dispose")
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (15)
CommandLineBreakingChanges.vb (5)
40</text>.Value.Trim().Replace(vbLf, vbCrLf), tempLog.ReadAllText().Trim().Replace(src, "SRC.VB")) 76</text>.Value.Trim().Replace(vbLf, vbCrLf), tempOut.ReadAllText().Trim().Replace(src, "SRC.VB")) 108</text>.Value.Trim().Replace(vbLf, vbCrLf), tempOut.ReadAllText().Trim().Replace(src, "SRC.VB")) 140</text>.Value.Trim().Replace(vbLf, vbCrLf), tempOut.ReadAllText().Trim().Replace(src, "SRC.VB")) 175</text>.Value.Trim().Replace(vbLf, vbCrLf), tempOut.ReadAllText().Trim().Replace(src, "SRC.VB"))
CommandLineTests.vb (10)
622</text>.Value.Trim().Replace(vbLf, vbCrLf), tempOut.ReadAllText().Trim().Replace(src, "SRC.VB")) 641</text>.Value.Trim().Replace(vbLf, vbCrLf), tempOut.ReadAllText().Trim().Replace(src, "SRC.VB")) 5226</text>, output.Replace(dir.Path, "{SDKPATH}")) 5236</text>, output.Replace(dir.Path, "{SDKPATH}")) 5245</text>, output.Replace(dir.Path, "{SDKPATH}")) 5253AssertOutput(<text></text>, output.Replace(dir.Path, "{SDKPATH}")) ' SUCCESSFUL BUILD with 'mscorlib.dll' and embedded VbCore 5259AssertOutput(<text></text>, output.Replace(dir.Path, "{SDKPATH}")) 5291AssertOutput(<text>vbc : error BC2017: could not find library 'mscorlib.dll'</text>, output.Replace(dir.Path, "{SDKPATH}")) 5299AssertOutput(<text></text>, output.Replace(dir.Path, "{SDKPATH}")) 5306</text>, output.Replace(dir.Path, "{SDKPATH}"))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (29)
Emit\CompilationEmitTests.vb (3)
1061Dim source1 As String = sourceTemplate.Replace("CHANGE", change1) 1066Dim source2 = sourceTemplate.Replace("CHANGE", change2) 1430Dim source As String = sourceTemplate.Replace("CHANGE", change)
Emit\EditAndContinue\EditAndContinueClosureTests.vb (12)
2087Dim source0 = MarkedSource(template.Replace("<<VALUE>>", "0")) 2088Dim source1 = MarkedSource(template.Replace("<<VALUE>>", "1")) 2089Dim source2 = MarkedSource(template.Replace("<<VALUE>>", "2")) 2127v0.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "0")) 2138diff1.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "1")) 2149diff2.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "2")) 2165Dim source0 = MarkedSource(template.Replace("<<VALUE>>", "0")) 2166Dim source1 = MarkedSource(template.Replace("<<VALUE>>", "1")) 2167Dim source2 = MarkedSource(template.Replace("<<VALUE>>", "2")) 2205v0.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "0")) 2216diff1.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "1")) 2227diff2.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)
5531Dim source0 = MarkedSource(template.Replace("<<VALUE>>", "0")) 5532Dim source1 = MarkedSource(template.Replace("<<VALUE>>", "1")) 5533Dim source2 = MarkedSource(template.Replace("<<VALUE>>", "2")) 5602v0.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "0")) 5613diff1.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "1")) 5624diff2.VerifyIL("C.F", expectedIL.Replace("<<VALUE>>", "2")) 6750Dim tree1 = VisualBasicSyntaxTree.ParseText(source0.Replace("' Body", "N1(): N2()"), parseOptions)
XmlLiteralTests.vb (1)
3562str = 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)
1795Dim fixedSource = expected.Replace("Class C", "[|Class C|]") 1830Dim fixedSource = expected.Replace("Class C", "[|Class C|]") 1869Dim fixedSource = expected.Replace("Class C", "[|Class C|]") 1910Dim fixedSource = expected.Replace("Class C", "[|Class C|]") 1944Dim fixedSource = expected.Replace("Class C", "[|Class C|]") 1978Dim fixedSource = expected.Replace("Class C", "[|Class C|]") 2012Dim 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)
58Replace(s_startTag, New String(" "c, s_startTag.Length)). 59Replace(s_endTag, New String(" "c, s_endTag.Length)). 60Replace(s_startSpanMark, New String(" "c, s_startSpanMark.Length)). 61Replace(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 (32)
DocumentationComments\DocCommentTests.vb (1)
11923Return If(str Is Nothing, obj, str.Replace(what, [with]))
SymbolsTests\GenericConstraintTests.vb (7)
533compilationVerifier.VerifyIL("B1(Of T).F1(Of U)(U)", expectedIL.Replace("F1", "F1")) 534compilationVerifier.VerifyIL("B1(Of T).F2(Of U)(U)", expectedIL.Replace("F1", "F2")) 535compilationVerifier.VerifyIL("B1(Of T).F3(Of U)(U)", expectedIL.Replace("F1", "F3")) 536compilationVerifier.VerifyIL("B2(Of T).F1(Of U)(U)", expectedIL.Replace("F1", "F1")) 537compilationVerifier.VerifyIL("B2(Of T).F2(Of U)(U)", expectedIL.Replace("F1", "F2")) 538compilationVerifier.VerifyIL("B2(Of T).F3(Of U)(U)", expectedIL.Replace("F1", "F3")) 539compilationVerifier.VerifyIL("B2(Of T).F4(Of U)(U)", expectedIL.Replace("F1", "F4"))
SymbolsTests\Metadata\PE\LoadingOperators.vb (12)
595Replace("Boolean", "System.Boolean"). 596Replace("Integer", "System.Int32"). 597Replace("Byte", "System.Byte"), method.ToTestDisplayString()) 1191Replace("Boolean", "System.Boolean"). 1192Replace("Integer", "System.Int32"). 1193Replace("Byte", "System.Byte"), method.ToTestDisplayString()) 1953Replace("Boolean", "System.Boolean"). 1954Replace("Integer", "System.Int32"). 1955Replace("Byte", "System.Byte"), method.ToTestDisplayString()) 2087Replace("Boolean", "System.Boolean"). 2088Replace("Integer", "System.Int32"). 2089Replace("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\Source\OperatorsTests.vb (3)
193Replace("Boolean", "System.Boolean"). 194Replace("Integer", "System.Int32"). 195Replace("Byte", "System.Byte"), op.ToTestDisplayString())
SymbolsTests\Source\TypeTests.vb (6)
3326Using reference = IlasmUtilities.CreateTempAssembly(modSource.Replace("<<ModuleName>>", "module1_FT1").Replace("<<TypesForWardedToAssembly>>", "ForwardedTypes1"), 3333Using reference = IlasmUtilities.CreateTempAssembly(modSource.Replace("<<ModuleName>>", "module2_FT1").Replace("<<TypesForWardedToAssembly>>", "ForwardedTypes1"), 3340Using reference = IlasmUtilities.CreateTempAssembly(modSource.Replace("<<ModuleName>>", "module3_FT2").Replace("<<TypesForWardedToAssembly>>", "ForwardedTypes2"),
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 (11)
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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
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)
2770("Encoding.csproj", Resources.ProjectFiles.CSharp.Encoding.Replace("<CodePage>ReplaceMe</CodePage>", "<CodePage>-1</CodePage>")), 2789("Encoding.csproj", Resources.ProjectFiles.CSharp.Encoding.Replace("<CodePage>ReplaceMe</CodePage>", "<CodePage>Broken</CodePage>")), 2808("Encoding.csproj", Resources.ProjectFiles.CSharp.Encoding.Replace("<CodePage>ReplaceMe</CodePage>", string.Empty)), 2859("Encoding.csproj", Resources.ProjectFiles.CSharp.Encoding.Replace("<CodePage>ReplaceMe</CodePage>", string.Empty)), 3316("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)
643markupCode = markupCode.Replace("$", "\uD7FF"); 654code = code.Replace("\uD7FF", "$");
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
CodeCleanup\FixIncorrectTokenTests.cs (2)
713=> 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(""" 116.Replace("<SymbolKind>Method</SymbolKind>", "<MethodKind>Ordinary</MethodKind>"),
SymbolKeyTests.cs (1)
1418var newTree = syntaxTree.WithChangedText(text.WithChanges(new TextChange(new TextSpan(0, text.Length), text.ToString().Replace(" ", " "))));
SyntaxPathTests.cs (1)
318var 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.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)
387artifactModel.PipelineArtifactPath = relativePath.Replace(@"\", "/");
Microsoft.DotNet.Build.Tasks.Installers (2)
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)
595fileContents = 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)
162private 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.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.Extensions.Validation.ValidationsGenerator (1)
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
36var typeIdName = typeId.ToString().Replace("__", "+").Replace('_', '.');
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 (3)
ComInterfaceGenerator.cs (1)
234context.AddSource(data.TypeName.Replace(TypeNames.GlobalAlias, ""), data.Source);
ComInterfaceInfo.cs (2)
221attrInfo.StringMarshallingCustomType.FullTypeName.Replace(TypeNames.GlobalAlias, ""), 303exceptionToUnmanagedMarshallerType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat).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 (1)
Options\VisualStudioOptionStorage.cs (1)
55=> keyName.Replace(LanguagePlaceholder, language switch
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
ProjectSystemShim\LegacyProject\AnalyzersTests.cs (2)
150var pathWithExtraBackslashes = ruleSetFile.Path.Replace(@"\", @"\\"); 260File.WriteAllText(ruleSetFile.Path, ruleSetSource.Replace("Error", "Warning"));
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (2)
MockExtensionManager.vb (2)
35Return content.RelativePath.Replace("$RootFolder$", Path.Combine(TempRoot.Root, "ResolvedRootFolder")) 37Return 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)
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)
577.Replace("/", "_") 578.Replace("=", string.Empty);
Roslyn.Diagnostics.Analyzers (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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
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));
Roslyn.Diagnostics.CSharp.Analyzers (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)));
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 (2)
Services\PerformanceTrackerServiceTests.cs (1)
258var convert = name.Replace(@"\", ".");
UnifiedSettings\TestModel\Input.cs (1)
58RoamingProfileStorage roamingProfile => roamingProfile.Key.Replace("%LANGUAGE%", languageId),
RunTests (1)
HelixTestRunner.cs (1)
147var queuedBy = GetEnv("BUILD_QUEUEDBY", "roslyn").Replace(" ", "");
Security.TransportSecurity.IntegrationTests (1)
Negotiate\NegotiateStream_Http_Tests.4.1.0.cs (1)
185string 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.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 (4)
EventSourceGenerator.Emitter.cs (2)
60private {ec.ClassName}() : base(new Guid({ec.Guid.ToString("x").Replace("{", "").Replace("}", "")}), ""{ec.SourceName}"") {{ }}");
NativeRuntimeEventSourceGenerator.cs (1)
304writer.Write($" [Event({eventId}, Version = {version}, Level = EventLevel.{level?.Replace("win:", "")}");
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.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 (6)
RegexGenerator.Emitter.cs (5)
31text.Replace("&", "&amp;").Replace("<", "&lt;").Replace(">", "&gt;"); 4096string containsExpr = indexOfExpr.Replace("IndexOf", "Contains"); 5653BitConverter.ToString(bytes).Replace("-", "");
UpgradeToGeneratedRegexCodeFixer.cs (1)
301string escapedVerbatimText = str.Replace("\"", "\"\"");
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)
Test.Utilities (9)
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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
241_stringBuilder.Append(value.Replace("\"", "\"\""));
Text.Analyzers (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)
19=> str.Replace("\\r", "\r").Replace("\\n", "\n"); 22=> str.Replace("\r", "\\r").Replace("\n", "\\n");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
631? substring.Replace("\"\"", "\"")
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));
vbc (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
577.Replace("/", "_") 578.Replace("=", string.Empty);
VBCSCompiler (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
577.Replace("/", "_") 578.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)),